import{an as z,z as O,ao as E,m as M,ah as W,ap as F,aq as G,ar as K,as as Q,ak as V,at as X,ad as T,a as Y}from"./B7moA0Zy.js";function _(e,c={}){const r=c.head||z();if(r)return r.ssr?r.push(e,c):D(r,e,c)}function D(e,c,r={}){const l=O(!1),o=O({});E(()=>{o.value=l.value?{}:K(c)});const s=e.push(o.value,r);return M(o,a=>{s.patch(a)}),Q()&&(W(()=>{s.dispose()}),F(()=>{l.value=!0}),G(()=>{l.value=!1})),s}const le=(e,c,r,l,o,s=!1,f=!1)=>{var x,C,U,k,H,$,A,B,J,L,N;const a=V(),{seo:{title:P,description:R,social:{facebook:{title:ee,description:te,image:h},twitter:{title:ne,description:ie,image:y}}},address:t,telephone:S}=a.globals,m=(e==null?void 0:e.title)||c||P,b=X((e==null?void 0:e.description)||r||R),w=((U=(C=(x=e==null?void 0:e.social)==null?void 0:x.facebook)==null?void 0:C.image)==null?void 0:U.url)||(($=(H=(k=e==null?void 0:e.social)==null?void 0:k.twitter)==null?void 0:H.image)==null?void 0:$.url)||l||(h==null?void 0:h.url)||(y==null?void 0:y.url),I=()=>{var p,u,d,g,v,j;const i={"@context":"https://schema.org","@type":"LocalBusiness",image:"",name:"Zucchetti",address:[{"@type":"PostalAddress",streetAddress:`${(p=t==null?void 0:t.parts)==null?void 0:p.address}, ${(u=t==null?void 0:t.parts)==null?void 0:u.number}`,addressLocality:((d=t==null?void 0:t.parts)==null?void 0:d.city)||"",addressRegion:((g=t==null?void 0:t.parts)==null?void 0:g.county)||"",postalCode:((v=t==null?void 0:t.parts)==null?void 0:v.postcode)||"",addressCountry:((j=t==null?void 0:t.parts)==null?void 0:j.state)||""}],url:T().public.baseUrl,telephone:S||""};return{type:"application/ld+json",async:!0,children:JSON.stringify(i)}},Z=()=>{const i={"@context":"https://schema.org/","@type":"WebSite",url:T().public.baseUrl,description:b,image:w};return{type:"application/ld+json",children:JSON.stringify(i)}},q=i=>{const{name:p,description:u,image:d,url:g,availability:v,price:j,currency:re}=i;return{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org/","@type":"Product",name:p,description:u,image:d,brand:{"@type":"Brand",name:"Zucchetti"}})}};let n=[];return s&&(n=((B=(A=a.seo)==null?void 0:A.scripts)==null?void 0:B.map(i=>({type:"text/javascript",children:i.scriptChildren,body:i.body||!1,client:i.body||!1})))||[],n==null||n.push(I())),o&&(n=[...n,...o.map(i=>({type:"text/javascript",children:i.scriptChildren,body:i.body||!1,client:i.body||!1}))||[]]),f&&(n==null||n.push(q(f))),n==null||n.push(Z()),_({title:m,titleTemplate:m,meta:[{name:"description",content:b},{property:"og:title",content:m},{property:"og:description",content:b},{property:"og:image",content:w},{name:"robots",content:((L=(J=e==null?void 0:e.advanced)==null?void 0:J.robots)==null?void 0:L.join(", "))||void 0}],link:[{rel:"canonical",href:((N=e==null?void 0:e.advanced)==null?void 0:N.canonical)||`${T().public.baseUrl}${Y().fullPath}`}],script:n})};export{le as u};