import{M as v}from"./MainNavbar-DYfeRcdr.js";import{i as w,Z as b,r as u,c as r,a as c,w as k,b as t,t as i,h as C,F as g,d as x,f as h,o as a,n as L}from"./app-CBssobj-.js";import{F as S}from"./v3-DnjJww8i.js";import{C as j}from"./ClientScrollTimeline-CnUXvyjc.js";import{C as I}from"./ClientFooterDown-B1P9jP1W.js";import{_ as N}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./SearchModal-BTKERLZv.js";/* empty css */const M={name:"Show",components:{ClientFooterDown:I,ClientScrollTimeline:j,Link:w,MainNavbar:v,FsLightbox:S,Head:b},data(){return{blocks:this.blocksWithSlideNumber,userData:this.$page.props.auth.user,toggler:!1,togglerGallery:!1,editorImages:[],galleryImages:[],slide:1,gallerySlide:1}},props:{post:{type:Array},mainSections:{type:Array}},methods:{textLimit(s,e){if(s.length>e){let l;return l=s.substring(0,e),l+"..."}return s},openEditorImagesOnSlide:function(s){this.slide=s,this.toggler=!this.toggler},openGalleryImagesOnSlide:function(s){this.gallerySlide=s,this.togglerGallery=!this.togglerGallery}},mounted(){this.editorImages=this.blocksWithSlideNumber.filter(s=>s.type==="image").map(s=>s.data.file.url),this.galleryImages=this.post.data.gallery.images.map(s=>s.path)},computed:{blocksWithSlideNumber(){let s=1;return this.post.data.content.blocks.map(e=>(e.type==="image"&&(e.slideNumber=s,s++),e))}}},B={class:"relative mx-auto mt-[67px] max-w-screen-xl px-4 py-10 md:flex md:flex-row md:py-10"},F={class:"max-w-3xl px-4 pt-6 lg:pt-10 pb-12 sm:px-6 lg:px-8 mx-auto"},z={class:"space-y-5 md:space-y-4"},G={class:"space-y-3"},V={class:"text-2xl font-bold md:text-3xl dark:text-white"},A={class:"flex justify-between border-t border-b border-gray-300 py-4 items-center mb-6"},D={class:"flex w-full sm:items-center gap-x-5 sm:gap-x-3"},H={class:"grow"},O={class:"grid sm:flex sm:justify-between sm:items-center gap-2"},T={class:"flex items-center whitespace-nowrap min-w-0","aria-label":"Breadcrumb"},W={class:"text-sm font-semibold text-gray-800 truncate dark:text-gray-200","aria-current":"page"},E={class:"flex items-center"},Z={class:"block text-xs text-gray-500 mr-3"},q={class:"inline-block relative pr-6 last:pr-0 last-of-type:before:hidden before:absolute before:top-1/2 before:right-2 before:-translate-y-1/2 before:w-1 before:h-1 before:bg-gray-300 before:rounded-full dark:text-gray-400 dark:before:bg-gray-600"},Y={class:"hs-tooltip [--trigger:hover] [--placement:bottom]"},J={class:"hs-tooltip-toggle sm:mb-1 block text-left cursor-pointer"},K={class:"font-normal text-sm text-gray-800 dark:text-gray-200 underline hover:text-gray-500"},P={class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 transition-opacity inline-block absolute invisible z-10 max-w-xs cursor-default bg-gray-900 divide-y divide-gray-700 shadow-lg rounded-xl dark:bg-black",role:"tooltip"},Q={class:"p-4 sm:p-5"},R={class:"mb-2 flex w-full sm:items-center gap-x-5 sm:gap-x-3"},U={class:"grow"},X={class:"text-lg font-semibold text-gray-200"},$={key:0},tt=["onClick","src","alt"],et={class:"mt-3 text-sm text-center text-gray-500"},st={key:1},ot={class:"text-[16px] text-gray-800 dark:text-gray-200 text-justify leading-7"},lt={key:2,class:""},rt=["innerHTML"],it={key:3},at={class:"flex border rounded-lg px-4 py-2 items-center justify-between"},nt={class:"flex items-center"},dt=["href"],ct={key:0,class:"grid gap-4 border-t border-gray-300 py-4"},gt={class:"relative"},ht=["src"],mt={class:"absolute inset-x-0 bottom-5 flex flex-col justify-center items-center"},ut={class:"text-white text-sm lg:text-xl text-center"},xt={class:"text-gray-400 text-sm"},pt={style:{"z-index":"1000"},id:"hs-large-modal",class:"hs-overlay hidden w-full h-full fixed top-0 left-0 z-[60] overflow-x-hidden overflow-y-auto"},ft={class:"hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all lg:max-w-4xl lg:w-full m-3 lg:mx-auto"},yt={class:"flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]"},_t={class:"flex justify-between items-center py-3 px-4 border-b dark:border-gray-700"},vt={class:"font-bold text-gray-800 dark:text-white"},wt={class:"p-4 overflow-y-auto"},bt={class:"grid grid-cols-2 md:grid-cols-3 gap-4"},kt=["onClick","src"];function Ct(s,e,l,Lt,n,d){const f=u("Head"),y=u("MainNavbar"),p=u("FsLightbox"),_=u("ClientFooterDown");return a(),r(g,null,[c(f,null,{default:k(()=>[t("title",null,i(l.post.data.title),1),e[0]||(e[0]=t("meta",{name:"description",content:"Your page description"},null,-1))]),_:1}),c(y,{class:"border-b",sections:this.mainSections},null,8,["sections"]),t("div",B,[t("div",F,[t("div",null,[t("div",z,[t("div",G,[t("h2",V,i(l.post.data.title),1)]),t("div",A,[t("div",D,[t("div",H,[t("div",O,[t("ol",T,[e[1]||(e[1]=C('
  • Главная
  • Новости
  • ',2)),t("li",W,i(d.textLimit(l.post.data.title,15)),1)]),t("div",E,[t("ul",Z,[t("li",q," Опубликовано: "+i(l.post.data.created_post),1)]),t("div",Y,[t("div",J,[t("span",K,i(l.post.data.authors.length===0?"":d.textLimit(l.post.data.authors[0].name,10)),1),t("div",P,[t("div",Q,[t("div",R,[t("div",U,[t("p",X,i(l.post.data.authors.length===0?"":l.post.data.authors[0].name),1)])]),e[2]||(e[2]=t("p",{class:"text-sm text-gray-400"}," Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ",-1))])])])])])])])])]),(a(!0),r(g,null,x(d.blocksWithSlideNumber,o=>(a(),r(g,null,[o.type==="image"?(a(),r("div",$,[t("figure",null,[t("img",{loading:"lazy",onClick:m=>d.openEditorImagesOnSlide(o.slideNumber),src:o.data.file.url,class:"w-full max-h-[500px] object-cover rounded-lg hover:opacity-95 hover:duration-200 transition",alt:o.data.caption},null,8,tt),t("figcaption",et,i(o.data.caption),1)])])):h("",!0),o.type==="paragraph"?(a(),r("div",st,[t("p",ot,i(o.data.text),1)])):h("",!0),o.type==="list"?(a(),r("div",lt,[t("ul",{class:L(["list-inside",{"list-disc":o.data.style==="unordered"}])},[(a(!0),r(g,null,x(o.data.items,m=>(a(),r("li",{class:"text-[16px] text-gray-800 dark:text-gray-200 text-justify leading-7",innerHTML:m},null,8,rt))),256))],2)])):h("",!0),o.type==="attaches"?(a(),r("div",it,[t("div",at,[t("div",nt,[e[3]||(e[3]=t("div",{class:"w-[35px] h-[35px] bg-black flex justify-center items-center rounded-xl mr-2"},[t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M18.375 12.739l-7.693 7.693a4.5 4.5 0 01-6.364-6.364l10.94-10.94A3 3 0 1119.5 7.372L8.552 18.32m.009-.01l-.01.01m5.699-9.941l-7.81 7.81a1.5 1.5 0 002.112 2.13",stroke:"white"})])],-1)),t("div",null,i(o.data.title),1)]),t("a",{href:o.data.file.url,download:"",type:"button",class:"w-[35px] h-[35px] flex bg-gray-100 rounded-lg justify-center items-center hover:bg-gray-200 duration-200"},e[4]||(e[4]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})],-1)]),8,dt)])])):h("",!0)],64))),256)),n.galleryImages.length?(a(),r("div",ct,[t("div",gt,[t("img",{class:"filter brightness-[0.7] w-full max-h-[500px] object-cover rounded-lg hover:opacity-95 hover:duration-200 transition",src:n.galleryImages[0],"data-hs-overlay":"#hs-large-modal",alt:""},null,8,ht),t("div",mt,[t("p",ut,i(l.post.data.title),1),t("span",xt,i(n.galleryImages.length)+" фотографий",1)])])])):h("",!0)])])]),t("div",pt,[t("div",ft,[t("div",yt,[t("div",_t,[t("h3",vt," Галлерея: "+i(l.post.data.title),1),e[5]||(e[5]=t("button",{type:"button",class:"hs-dropdown-toggle inline-flex flex-shrink-0 justify-center items-center h-8 w-8 rounded-md text-gray-500 hover:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 focus:ring-offset-white transition-all text-sm dark:focus:ring-gray-700 dark:focus:ring-offset-gray-800","data-hs-overlay":"#hs-large-modal"},[t("span",{class:"sr-only"},"Close"),t("svg",{class:"w-3.5 h-3.5",width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M0.258206 1.00652C0.351976 0.912791 0.479126 0.860131 0.611706 0.860131C0.744296 0.860131 0.871447 0.912791 0.965207 1.00652L3.61171 3.65302L6.25822 1.00652C6.30432 0.958771 6.35952 0.920671 6.42052 0.894471C6.48152 0.868271 6.54712 0.854471 6.61352 0.853901C6.67992 0.853321 6.74572 0.865971 6.80722 0.891111C6.86862 0.916251 6.92442 0.953381 6.97142 1.00032C7.01832 1.04727 7.05552 1.1031 7.08062 1.16454C7.10572 1.22599 7.11842 1.29183 7.11782 1.35822C7.11722 1.42461 7.10342 1.49022 7.07722 1.55122C7.05102 1.61222 7.01292 1.6674 6.96522 1.71352L4.31871 4.36002L6.96522 7.00648C7.05632 7.10078 7.10672 7.22708 7.10552 7.35818C7.10442 7.48928 7.05182 7.61468 6.95912 7.70738C6.86642 7.80018 6.74102 7.85268 6.60992 7.85388C6.47882 7.85498 6.35252 7.80458 6.25822 7.71348L3.61171 5.06702L0.965207 7.71348C0.870907 7.80458 0.744606 7.85498 0.613506 7.85388C0.482406 7.85268 0.357007 7.80018 0.264297 7.70738C0.171597 7.61468 0.119017 7.48928 0.117877 7.35818C0.116737 7.22708 0.167126 7.10078 0.258206 7.00648L2.90471 4.36002L0.258206 1.71352C0.164476 1.61976 0.111816 1.4926 0.111816 1.36002C0.111816 1.22744 0.164476 1.10028 0.258206 1.00652Z",fill:"currentColor"})])],-1))]),t("div",wt,[t("div",bt,[(a(!0),r(g,null,x(n.galleryImages.slice(),(o,m)=>(a(),r("div",null,[t("img",{loading:"lazy",onClick:St=>d.openGalleryImagesOnSlide(m+1),class:"h-[200px] w-full object-cover rounded-lg hover:scale-[1.05] hover:opacity-95 hover:duration-200 transition",src:o,alt:""},null,8,kt)]))),256))])])])])]),c(p,{class:"z-1100",slide:n.gallerySlide,toggler:n.togglerGallery,sources:n.galleryImages},null,8,["slide","toggler","sources"]),c(p,{class:"z-1000",slide:n.slide,toggler:n.toggler,sources:n.editorImages},null,8,["slide","toggler","sources"])]),c(_)],64)}const Vt=N(M,[["render",Ct]]);export{Vt as default};