1import{c as p,a as i,w as d,u as o,F as h,o as c,b as t,i as r,e as a,t as n,x as v,n as f,z as w,O as k}from"./app-bb060f73.js";import{_ as C}from"./SidebarLayout-0a42e6cc.js";import{u as B,_ as S}from"./useToggleAlertPopup-5bc623ba.js";import"./DropdownLink-8b5e4536.js";import"./transition-2ceb30cf.js";import"./hidden-94cd2a09.js";import"./use-resolve-button-type-d00cb459.js";const N={class:"px-4 sm:px-6 lg:px-8"},D={class:"sm:flex sm:items-center mb-2"},O={class:"sm:flex sm:items-center"},P={class:"sm:flex-auto"},V={class:"text-base font-semibold leading-6 text-gray-900"},z={class:"mt-2 text-sm text-gray-700"},A={class:"mt-4 sm:ml-16 sm:mt-0 sm:flex-none"},E={class:"mt-8 flow-root"},F={class:"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"},L={class:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8"},T={class:"min-w-full divide-y divide-gray-300"},$={class:"divide-y divide-gray-200"},j={class:"whitespace-nowrap px-3 py-4 text-sm text-gray-500"},I={class:"whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-0"},R={class:"whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-0"},q={key:0},G={key:1},H={class:"relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-0"},J=["data-route"],K={class:"relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-0"},M=["data-route","data-id"],et={__name:"PageList",props:{pages:Object,count:Number,slug:String,title:String},setup(m){const{isShowAlertPopup:x,onShowBtnClick:u,onCloseBtnClick:y,onDeleteClick:_}=B(),b=s=>{w.post(route("pages.replicate",s.target.dataset.id)).then(l=>{k.reload({only:["pages"]})})};return(s,l)=>(c(),p(h,null,[i(C,null,{default:d(()=>[t("div",N,[t("div",D,[i(o(r),{href:s.route("pages.index"),class:"block rounded-md bg-red-600 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-red-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-red-700"},{default:d(()=>l[1]||(l[1]=[a(" < Ðазад ")])),_:1},8,["href"])]),t("div",O,[t("div",P,[t("h1",V,n(m.title),1),t("p",z,"СпиÑок ÑÑÑÐ°Ð½Ð¸Ñ / Ðол-во ( "+n(m.count)+" )",1)]),t("div",A,[i(o(r),{href:s.route("pages.create"),class:"block rounded-md bg-red-600 px-3 py-2 text-center text-sm font-semibold text-white shadow-sm hover:bg-red-700 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-red-700"},{default:d(()=>l[2]||(l[2]=[a(" ÐобавиÑÑ ÑÑÑаниÑÑ ")])),_:1},8,["href"])])]),t("div",E,[t("div",F,[t("div",L,[t("table",T,[l[3]||(l[3]=t("thead",null,[t("tr",null,[t("th",{scope:"col",class:"py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-0"},"ID"),t("th",{scope:"col",class:"py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-0"},"Ðазвание"),t("th",{scope:"col",class:"py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-0"},"Slug ÑÑÑаниÑÑ"),t("th",{scope:"col",class:"py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-0"},"СÑаÑÑÑ"),t("th",{scope:"col",class:"py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 sm:pl-0"},"ÐлавнаÑ"),t("th",{scope:"col",class:"relative py-3.5 pl-3 pr-4 sm:pr-0"},[t("span",{class:"sr-only"},"Edit")])])],-1)),t("tbody",$,[(c(!0),p(h,null,v(m.pages,e=>(c(),p("tr",null,[t("td",j,[i(o(r),{href:s.route("pages.edit",e.id),class:"inline-block p-[5px] rounded-md transition-all hover:text-red-700"},{default:d(()=>[a(n(e.id),1)]),_:2},1032,["href"])]),t("td",{class:f(["whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium sm:pl-0",{"text-gray-900":!e.is_hidden,"text-gray-400":e.is_hidden}])},[i(o(r),{href:s.route("pages.edit",e.id),class:"inline-block p-[5px] rounded-md transition-all hover:text-red-700"},{default:d(()=>[a(n(e.name),1)]),_:2},1032,["href"])],2),t("td",{class:f(["whitespace-nowrap py-4 pl-4 pr-3 text-sm font-medium sm:pl-0",{"text-gray-900":!e.is_hidden,"text-gray-400":e.is_hidden}])},[i(o(r),{href:s.route("pages.edit",e.id),class:"inline-block p-[5px] rounded-md transition-all hover:text-red-700"},{default:d(()=>[a(n(e.slug),1)]),_:2},1032,["href"])],2),t("td",I,[i(o(r),{href:s.route("pages.edit",e.id),class:"inline-block p-[5px] rounded-md transition-all hover:text-red-700"},{default:d(()=>[a(n(e.is_hidden===1?"СкÑÑÑа":"ÐпÑбликована"),1)]),_:2},1032,["href"])]),t("td",R,[i(o(r),{href:s.route("pages.edit",e.id),class:"inline-block p-[5px] rounded-md transition-all hover:text-red-700"},{default:d(()=>[e.main?(c(),p("span",q,"Ðа")):(c(),p("span",G))]),_:2},1032,["href"])]),t("td",H,[t("button",{class:"inline-block p-[5px] rounded-md transition-all hover:text-red-700","data-route":s.route("pages.destroy",e.id),onClick:l[0]||(l[0]=(...g)=>o(u)&&o(u)(...g))},"УдалиÑÑ",8,J)]),t("td",K,[t("button",{class:"inline-block p-[5px] rounded-md transition-all hover:text-red-700","data-route":s.route("pages.replicate",e.id),"data-id":e.id,onClick:b},"ÐлониÑоваÑÑ",8,M)])]))),256))])])])])])])]),_:1}),i(S,{"back-path":s.route("pages-in-category",m.slug),"is-active":o(x),"handler-close":o(y),"handler-delete":o(_)},null,8,["back-path","is-active","handler-close","handler-delete"])],64))}};export{et 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.