1import Q from"./DpVfG81l.js";import W from"./enz6qRYn.js";import{d as X,ad as Y,a1 as Z,o as tt,ae as et,e as i,f as l,n as t,t as n,M as at,y as u,A as m,i as st,F as H,g as O,_ as ot}from"./DnecDYb_.js";import{_ as it}from"./Bdwf2fRC.js";import{_ as p,a as lt}from"./CHTfhe7t.js";import{_ as rt}from"./DqLF2o29.js";import"./CVUxYfr2.js";const nt={class:"page-title-area"},ct={class:"d-table"},dt={class:"d-table-cell"},ht={class:"container"},gt={class:"py-20"},ut={class:"container"},mt={class:"flex flex-wrap"},pt={class:"w-full lg:w-8/12 px-2"},bt={class:"blog-details-desc"},ft={class:"article-content"},yt={class:"flex justify-between items-center gap-4 flex-wrap mb-6"},xt={class:"flex gap-4 pl-0 list-none",style:{"margin-bottom":"0px !important","padding-left":"0px !important","list-style-type":"none !important"}},vt={class:"flex items-center gap-1"},_t={href:"#",class:"text-sm"},wt={key:0,class:"flex items-center gap-1"},kt=["href"],Tt={key:1,class:"text-sm text-gray-500"},Ct={key:0},Lt=["innerHTML"],Bt={class:"mt-8 pt-6 border-t border-gray-200 space-y-4"},Dt={key:0},$t={class:"flex flex-wrap gap-2"},zt=["href"],Nt={key:1},St={class:"flex flex-wrap gap-2"},Ut=["href"],It={class:"w-full lg:w-4/12 px-2"},Mt=X({__name:"BlogDetails",props:{article:{},listblog:{},listTags:{},categories:{},checkLayout:{},dataTemplate:{}},setup(a){const b=a,c=Y();Z();const R=s=>s?new Date(s).toLocaleDateString("vi-VN",{year:"numeric",month:"long",day:"numeric"}):"",G=s=>{var o;const e=((o=b.checkLayout)==null?void 0:o.pageUrl)||"";return e&&e===c.params.slug&&e!=="danh-sach-bai-viet"?`/${e}?tags=${s}`:`/danh-sach-bai-viet?tags=${s}`},J=s=>{var o;const e=((o=b.checkLayout)==null?void 0:o.pageUrl)||"";return e&&e===c.params.slug&&e!=="danh-sach-bai-viet"?`/${e}/${s}`:`/danh-sach-bai-viet?category=${s}`},K=()=>{window.location.href=`${c.path}/thuc-hanh`},P=()=>{document.querySelectorAll("pre code").forEach(s=>{var d;if((d=s.parentNode)!=null&&d.querySelector(".copy-btn"))return;const e=document.createElement("button");e.type="button",e.innerText="Copy",e.className="copy-btn absolute top-1 right-1 px-2 py-1 text-xs bg-white/20 text-white border border-white/50 rounded cursor-pointer hover:bg-white/30 transition-colors",e.onclick=()=>{const h=s.innerText;navigator.clipboard.writeText(h).then(()=>{e.innerText="Copied!",setTimeout(()=>e.innerText="Copy",2e3)}).catch(g=>{console.error("Failed to copy:",g)})};const o=s.parentNode;o.style.position="relative",o.appendChild(e)})};return tt(()=>{et(()=>{P()})}),(s,e)=>{var h,g,f,y,x,v,_,w,k,T,C,L,B,D,$,z,N,S,U,I,M,V,A,E,F,j,q;const o=Q,d=W;return l(),i("div",null,[t("div",nt,[t("div",ct,[t("div",dt,[t("div",ht,[t("h2",null,n((h=a.article)==null?void 0:h.title),1)])])]),e[0]||(e[0]=t("div",{class:"shape1 rotateme"},[t("img",{src:at,alt:"shape",format:"webp",loading:"lazy",width:"30",height:"30"})],-1)),e[1]||(e[1]=t("div",{class:"shape3 rotateme"},[t("img",{src:it,alt:"shape",format:"webp",loading:"lazy",width:"30",height:"30"})],-1)),e[2]||(e[2]=t("div",{class:"shape4 rotateme"},[t("img",{src:p,alt:"shape",format:"webp",loading:"lazy",width:"30",height:"30"})],-1)),e[3]||(e[3]=t("div",{class:"shape5 rotateme"},[t("img",{src:rt,alt:"shape",format:"webp",loading:"lazy",width:"30",height:"30"})],-1)),e[4]||(e[4]=t("div",{class:"shape6 rotateme"},[t("img",{src:p,alt:"shape",format:"webp",loading:"lazy",width:"30",height:"30"})],-1)),e[5]||(e[5]=t("div",{class:"shape7 rotateme"},[t("img",{src:p,alt:"shape",format:"webp",loading:"lazy",width:"30",height:"30"})],-1)),e[6]||(e[6]=t("div",{class:"shape8 rotateme"},[t("img",{src:lt,alt:"shape",format:"webp",loading:"lazy",width:"30",height:"30"})],-1))]),t("div",gt,[t("div",ut,[t("div",mt,[t("div",pt,[t("div",bt,[t("div",ft,[t("div",yt,[t("div",null,[t("ul",xt,[t("li",vt,[m(o,{name:"lucide:clock",class:"w-4 h-4 text-[#44ce6f]"}),t("a",_t,n(R((g=a.article)==null?void 0:g.publishedAt)),1)]),(v=(x=(y=(f=a.article)==null?void 0:f.author)==null?void 0:y.data)==null?void 0:x.attributes)!=null&&v.slug?(l(),i("li",wt,[m(o,{name:"lucide:user",class:"w-4 h-4"}),t("a",{href:`/author/${(T=(k=(w=(_=a.article)==null?void 0:_.author)==null?void 0:w.data)==null?void 0:k.attributes)==null?void 0:T.slug}`,class:"text-sm cursor-pointer hover:text-green-600"},n((D=(B=(L=(C=a.article)==null?void 0:C.author)==null?void 0:L.data)==null?void 0:B.attributes)==null?void 0:D.name),9,kt)])):(l(),i("li",Tt,"Chưa có tác giả"))])]),!st(c).params.slug4&&(($=a.dataTemplate)==null?void 0:$.length)>0?(l(),i("div",Ct,[t("button",{onClick:K,class:"button-lab"}," Thực hà nh Lab ")])):u("",!0)]),t("div",{class:"content-blogs-data prose prose-lg max-w-none",innerHTML:(z=a.article)==null?void 0:z.content},null,8,Lt)]),t("div",Bt,[(S=(N=a.article)==null?void 0:N.categories)!=null&&S.data&&((I=(U=a.article)==null?void 0:U.categories)==null?void 0:I.data.length)>0?(l(),i("div",Dt,[e[7]||(e[7]=t("h4",{class:"text-sm font-[500] text-gray-700 mb-3"},"Danh mục:",-1)),t("div",$t,[(l(!0),i(H,null,O(a.article.categories.data,r=>(l(),i("a",{key:r.attributes.slug,href:J(r.attributes.slug),class:"px-3 py-1 bg-blue-100 text-blue-700 rounded-full text-sm hover:bg-blue-200 transition-colors"},n(r.attributes.title),9,zt))),128))])])):u("",!0),(V=(M=a.article)==null?void 0:M.tags)!=null&&V.data&&((E=(A=a.article)==null?void 0:A.tags)==null?void 0:E.data.length)>0?(l(),i("div",Nt,[e[8]||(e[8]=t("h4",{class:"text-sm font-[500] text-gray-700 mb-3"},"Tags:",-1)),t("div",St,[(l(!0),i(H,null,O(a.article.tags.data,r=>(l(),i("a",{key:r.attributes.slug,href:G(r.attributes.slug),class:"px-3 py-1 bg-gray-200 rounded-full text-sm hover:bg-gray-300 transition-colors"},n(r.attributes.name||r.attributes.title),9,Ut))),128))])])):u("",!0)])])]),t("div",It,[m(d,{category:(j=(F=a.article)==null?void 0:F.categories)==null?void 0:j[0],listblog:a.listblog,"list-tags":a.listTags,categories:a.categories,"check-layout":a.checkLayout,portalId:(q=a.article)==null?void 0:q.portalId},null,8,["category","listblog","list-tags","categories","check-layout","portalId"])])])])])])}}}),Ot=Object.assign(ot(Mt,[["__scopeId","data-v-cdd75a3c"]]),{__name:"BlogDetails"});export{Ot 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.