import z from"./D4MfCrdh.js";import{_ as G}from"./CKzAgDox.js";import K from"./BrcSGC9q.js";import{d as b,c as S,w as A,o as r,e as f,t as V,z as O,f as i,a as x,_ as Q,j as W,F as Z,A as J,U as X,k as Y,W as tt,s as u,q as et,Z as at,E as ot,u as g,$ as st}from"./m2W8DxR4.js";import{a as nt,_ as lt}from"./DzRK5nIs.js";import rt from"./Ce_cQdpG.js";import{_ as it,a as ct}from"./BjwMfbly.js";import"./ByXNX2C_.js";import"./CbxdrCRW.js";import"./DT-hKSom.js";import"./_K6KS46d.js";import"./CYT-4scj.js";import"./D4cd7EFQ.js";import"./56PacuBL.js";import"./f4OvDAmT.js";import"./DaqkdMVO.js";import"./DN4yyKL7.js";import"./Wxbikq7x.js";import"./BXVhohEk.js";import"./C8p6Bfm2.js";const _t={class:"mb-4 text-3xl font-bold"},gt={class:"text-primary flex items-center justify-center gap-1 text-sm font-normal"},mt=b({__name:"SingleBlogHero",props:{title:{},image:{},date:{}},setup(m){const o=m;return(p,e)=>{const c=G,d=K;return r(),S(d,{pages:[{name:p.$t("blogs"),link:"/blogs"},{name:o.title}],image:{Url:o.image,Alt:o.title}},{title:A(()=>[f("p",_t,V(o.title),1),f("p",gt,[O(V(o.date)+" ",1),i(c,{class:"h-4 w-4"})])]),_:1},8,["pages","image"])}}}),pt={id:"single-blog",class:"bg-gradient-odd pt-section px-4 max-2xl:flex max-2xl:flex-col max-2xl:justify-center"},dt={class:"container mx-auto"},ut=["innerHTML"],ft=b({__name:"SingleBlogSection",props:{description:{type:String,required:!0}},setup(m){const o=m;return(p,e)=>{const c=Q;return r(),x("section",pt,[f("div",dt,[i(c,null,{default:A(()=>[f("p",{class:"v-html-prose leading-12",innerHTML:o.description},null,8,ut)]),_:1})])])}}}),xt=W(ft,[["__scopeId","data-v-e5e74394"]]),vt={id:"related-blogs",class:"bg-gradient-even py-section px-4 max-2xl:flex max-2xl:flex-col max-2xl:justify-center"},bt={class:"pb-section container mx-auto"},ht={class:"container mx-auto grid grid-cols-1 gap-10 md:grid-cols-2 lg:grid-cols-3"},Bt=b({__name:"RelatedBlogs",props:{relatedBlogs:{}},setup(m){const o=m;return(p,e)=>{const c=nt,d=rt,h=it,v=lt;return r(),x("section",vt,[f("div",bt,[i(c,{title:p.$t("relatedBlogs.title"),"title-heading":"h3"},null,8,["title"]),i(d),f("div",ht,[(r(!0),x(Z,null,J(o.relatedBlogs,n=>(r(),S(h,{id:n.id,key:n.id,slug:n.slug,title:n.title,tag:n.tag,description:n.description,image:n.image},null,8,["id","slug","title","tag","description","image"]))),128))])]),i(v)])}}}),St={key:1},q="https://webstdy.com",wt=b({__name:"[slug]",setup(m){var y;const o=X(),p=o.params.slug,{state:e,isPending:c}=ct(p),{locale:d}=Y(),h=tt(),v=u(()=>{var t,a,s,l,_;return((s=(a=(t=e.value.data)==null?void 0:t.blog)==null?void 0:a.meta)==null?void 0:s.title)||((_=(l=e.value.data)==null?void 0:l.blog)==null?void 0:_.title)}),n=u(()=>{var t,a,s,l,_;return((s=(a=(t=e.value.data)==null?void 0:t.blog)==null?void 0:a.meta)==null?void 0:s.meta_tag_description)||((_=(l=e.value.data)==null?void 0:l.blog)==null?void 0:_.description)}),E=u(()=>{var t,a,s;return(s=(a=(t=e.value.data)==null?void 0:t.blog)==null?void 0:a.meta)==null?void 0:s.meta_tag_keyword}),B=u(()=>{var t,a;return(a=(t=e.value.data)==null?void 0:t.blog)!=null&&a.slug_ar?`${q}/blogs/${e.value.data.blog.slug_ar}`:""}),$=u(()=>{var t,a;return(a=(t=e.value.data)==null?void 0:t.blog)!=null&&a.slug_en?`${q}/en/blogs/${e.value.data.blog.slug_en}`:""}),F=u(()=>d.value==="ar"?B.value:$.value);return et({title:v,description:n,keywords:E,ogTitle:v,ogDescription:n,ogImage:(y=e.value.data)==null?void 0:y.blog.image}),at(()=>{var t;return{link:(t=e.value.data)!=null&&t.blog?[{rel:"canonical",href:F.value},{rel:"alternate",hreflang:"x-default",href:B.value},{rel:"alternate",hreflang:"ar",href:B.value},{rel:"alternate",hreflang:"en",href:$.value}]:[]}}),ot(e,t=>{var a;if((a=t==null?void 0:t.data)!=null&&a.blog){const s=o.params.slug,l=d.value==="ar"?t.data.blog.slug_ar:t.data.blog.slug_en;s!==l&&st({name:"blogs-slug",params:{slug:l}},{external:!0}),h({ar:{slug:t.data.blog.slug_ar},en:{slug:t.data.blog.slug_en}})}},{immediate:!0}),(t,a)=>{var k,D,T,I,H,U,j,C,L,M,N,P,R;const s=z,l=mt,_=xt,w=Bt;return r(),x("main",null,[g(c)?(r(),S(s,{key:0})):(r(),x("div",St,[i(l,{title:((D=(k=g(e))==null?void 0:k.data)==null?void 0:D.blog.title)??"Default Title",page:((I=(T=g(e))==null?void 0:T.data)==null?void 0:I.blog.category)??"Default Category",image:((U=(H=g(e))==null?void 0:H.data)==null?void 0:U.blog.image)??"/default-image.jpg",date:((C=(j=g(e))==null?void 0:j.data)==null?void 0:C.blog.created_at)??new Date().toISOString()},null,8,["title","page","image","date"]),i(_,{description:((N=(M=(L=g(e))==null?void 0:L.data)==null?void 0:M.blog)==null?void 0:N.description)??"Default Description"},null,8,["description"]),i(w,{"related-blogs":((R=(P=g(e))==null?void 0:P.data)==null?void 0:R.relatedBlogs)??[]},null,8,["related-blogs"])]))])}}});export{wt as default};
