1import{_ as ne}from"./DwM2SozS.js";import{_ as oe}from"./C91_WqZW.js";import{_ as re}from"./Def7WYkp.js";import{_ as se}from"./Dlkm3EGq.js";import{_ as le}from"./Ds6671hG.js";import{_ as ie}from"./X46oB9We.js";import{_ as ce}from"./RoQ0bYQQ.js";import{au as j,aW as a,aX as o,ak as e,bn as x,aY as n,aZ as f,av as $,b0 as D,bo as B,a_ as h,a$ as w,bd as I,bq as me,bb as _,d,aD as ue,aV as _e,a as de,w as fe,ax as l,be as z,aU as pe,r as v,V as ge}from"./09qveeeb.js";import{b as q,a as E,d as he}from"./BZBrLHMd.js";import{useLanguageStore as ye}from"./DelHZDPE.js";import{u as be,a as ke,i as ve}from"./REoo-WoR.js";import{s as $e}from"./1btKFtzj.js";import{t as Ce}from"./DKQR8bOz.js";import{s as Te}from"./1yTwuv43.js";import{u as we}from"./BleZ85RS.js";import"./B-MXGax5.js";import"./BUwGR3Xo.js";import"./COmpPK3O.js";import"./DQBp71WD.js";const Pe={class:"feedback mb-5 mb-md-0"},xe={class:"feedback__title"},Be={class:"feedback__rating"},Ie={class:"feedback__content"},U=288,Se=j({__name:"FeedbackPreview",props:{comments:{}},setup(F){const C=q(),{t:S}=E(),y=d(()=>C.getterByComponent("tc_feedback")?.aliasPath||"#");function T(i){return i.length<=U?i:i.substring(0,U)}function L(i){return i.length>U}return(i,H)=>{const b=ce,p=me;return a(),o(e(x),null,{default:n(()=>[(a(!0),f($,null,D(F.comments,(g,r)=>(a(),o(e(B),{key:r,md:"4"},{default:n(()=>[h("div",Pe,[h("h2",xe,w(g.author),1),h("div",Be,[(a(),f($,null,D(5,s=>(a(),f($,{key:s},[s<=g.rating?(a(),o(b,{key:0,name:"star-solid",class:"feedback__star"})):(a(),o(b,{key:1,name:"star",class:"feedback__star"}))],64))),64))]),h("p",Ie,[I(w(T(g.content))+" ",1),L(g.content)?(a(),o(p,{key:0,to:`${e(y)}#${g.id}`},{default:n(()=>[I(" ..."+w(e(S)("label.read_more")),1)]),_:1},8,["to"])):_("",!0)])])]),_:2},1024))),128))]),_:1})}}}),Le={key:0,class:"tc-promo"},Ae={class:"container mb-5 pb-5"},Ve={class:"container mb-5 pb-5"},Me=["innerHTML"],tt=j({__name:"TcFrontPage",props:{categoryId:{},categoryLangId:{},componentName:{},aliasPath:{}},setup(F){const C=ge(),S=ue(),{t:y}=E(),T=q(),L=ye(),{getImageObject:i,getImageProps:H}=be(),{track:b}=he(),p=d(()=>T.getActive),g=d(()=>L.active),r=v({}),s=v({}),u=v({}),k=v({}),P=v([]),A=v(!0),O=d(()=>p.value?.title||Ce(p.value?.name)),V=d(()=>{const t=i(r.value);return Array.isArray(t)?t[0]:t}),M=d(()=>r.value?.media?.length?`${C.public.minioBaseUrl}${r.value.media[0].thumb_header}`:""),W=d(()=>T.getterByComponent("tc_list")),X=d(()=>T.getterByComponent("tc_feedback")?.aliasPath||"#");_e({title:O}),we({title:O,image:M,description:()=>p.value?.meta_description,keywords:()=>p.value?.meta_keywords});function Y(t){return t?`${y("label.photo_by")}: ${t}`:null}function Z(t){const c=W.value?.aliasPath;return c?t.type&&/^(place|service)$/.test(t.type)?`${c}/${t.id}/#anchor-${$e(t.name)}`.replace("//","/"):t.link||"#":"#"}async function R(){try{const[t,c]=await Promise.all([$fetch(`${C.public.apiUrl}/article`,{params:{category_object_id:p.value?.co_id,lang:g.value?.brief,relations:!0}}),$fetch(`${C.public.apiUrl}/tallinncard/customer_comment`,{params:{highlight:!0}}).catch(()=>[])]);Array.isArray(t)&&t.length>0&&(t[0]&&(r.value=t[0]),t[0]?.banner&&(u.value=t[0].banner),t[1]&&(s.value=t[1]),t[2]&&(k.value=t[2])),P.value=(c||[]).slice(0,3)}catch(t){console.log(t)}finally{A.value=!1}}return de(R),fe(()=>S.path,()=>{r.value={},s.value={},u.value={},k.value={},P.value=[],A.value=!0,R()}),(t,c)=>{const G=ne,J=oe,K=re,Q=se,N=le,ee=ie,te=Se;return a(),f("div",null,[e(A)?(a(),o(G,{key:0})):(a(),f($,{key:1},[e(r).id?(a(),f("div",Le,[e(M)?(a(),o(J,{key:0,src:e(M),"aspect-ratio":8/3,position:e(r).image?.position,caption:Y(e(V)?.author)??void 0,filter:"",alt:e(ve)(e(V)),title:e(ke)(e(V)),lazy:!1},null,8,["src","position","caption","alt","title"])):_("",!0),l(K,{headline:e(r).headline,leader:e(r).leader},null,8,["headline","leader"])])):_("",!0),h("section",Ae,[e(u)&&e(u).status?(a(),o(Q,{key:0,"left-html":e(u).text_left,"right-html":e(u).text_right,"color-left":e(u).color_left,"color-right":e(u).color_right},null,8,["left-html","right-html","color-left","color-right"])):_("",!0)]),h("section",Ve,[e(s).id?(a(),o(N,{key:0,title:e(s).headline,"title-tag":"h1",large:""},{default:n(()=>[h("div",{class:"row justify-content-around",innerHTML:e(Te)(e(s).leader)},null,8,Me),l(e(x),{"align-h":"center"},{default:n(()=>[l(e(B),{class:"mt-3 mt-md-5",sm:"auto"},{default:n(()=>[l(e(z),{to:e(s).link_to_url,variant:"primary",class:"w-100",pill:"",onClick:c[0]||(c[0]=m=>e(b)({action:e(s).headline,category:"TC frontpage"}))},{default:n(()=>[I(w(e(y)("label.read_more")),1)]),_:1},8,["to"])]),_:1})]),_:1})]),_:1},8,["title"])):_("",!0),e(k).id?(a(),o(N,{key:1,large:"",title:e(k).headline,"title-tag":"h1"},{default:n(()=>[l(e(x),null,{default:n(()=>[(a(!0),f($,null,D(e(k).relations,(m,ae)=>(a(),f($,{key:ae},[m.image||m.media?(a(),o(e(B),{key:0,md:"4",class:"mb-4"},{default:n(()=>[l(ee,pe({ref_for:!0},e(H)(m,{name:m.name}),{link:Z(m),title:m.name,"title-tag":"h2","max-height":"",onClick:Ne=>e(b)({action:e(k).headline,category:"TC frontpage",label:m.name})}),null,16,["link","title","onClick"])]),_:2},1024)):_("",!0)],64))),128))]),_:1})]),_:1},8,["title"])):_("",!0),e(P).length?(a(),o(N,{key:2,large:"","title-tag":"h1",title:e(y)("label.feedback")},{default:n(()=>[l(te,{comments:e(P)},null,8,["comments"]),l(e(x),{"align-h":"center"},{default:n(()=>[l(e(B),{class:"mt-3 mt-md-5",sm:"auto"},{default:n(()=>[l(e(z),{to:e(X),variant:"primary",class:"w-100",pill:"",onClick:c[1]||(c[1]=m=>e(b)({action:"feedback see all",category:"TC frontpage"}))},{default:n(()=>[I(w(e(y)("label.see_all")),1)]),_:1},8,["to"])]),_:1})]),_:1})]),_:1},8,["title"])):_("",!0)])],64))])}}});
1export{tt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.