1import{l as j,x as v,c as u,o as f,a as o,u as l,g as C,w as n,b as e,e as U,j as $,t as _,n as B,d as I,F as h,r as E,f as y,S as O}from"./app-BThMm6P-.js";import x from"./Button1-JPWYEA_q.js";import{C as k}from"./Copy-DM_5ioQU.js";import{a as g,_ as N,b as S}from"./TextInput-YiRkfUK0.js";import{_ as W}from"./AuthenticatedLayout-BOIKXaqX.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./Logo-CmAUhWV7.js";const D={class:"pt-4"},L={class:"py-12"},M={class:"mx-auto max-w-7xl sm:px-6 lg:px-8"},P={class:"overflow-hidden bg-background shadow-sm sm:rounded-lg text-white"},T={class:"w-full mt-10 pb-10 pt-10 lg:pt-0 md:pb-10 relative"},Z={class:"flex gap-6 pt-4"},q={class:"px-4 py-2"},A={class:"inline-flex items-center me-5 cursor-pointer"},G={class:"select-none ms-3 text-medium font-medium text-heading w-[100px]"},H={class:"w-full mt-10 pb-10 pt-10 lg:pt-0 md:pb-10 relative"},J={class:"mt-2 mb-4"},K={class:"font-medium text-[1.2rem] leading-tight text-neutral-200 mb-2"},Q={class:""},R={class:"mb-4"},X={class:"grid grid-cols-12 gap-4"},Y={class:"mb-4 lg:col-span-8 col-span-12 px-4"},ee={class:"flex"},se={class:"w-full"},te={class:"align-ceter content-center pt-[15px] px-3",title:"Skopiuj na pozostaÅe wersje jÄzykowe"},oe={class:"mb-4 lg:col-span-8 col-span-12 px-4"},le={class:"flex"},ae={class:"w-full"},ie={class:"uppercase"},ne={class:"align-ceter content-center pt-[15px] px-3",title:"Skopiuj na pozostaÅe wersje jÄzykowe"},he={__name:"Index",props:{buttons:Object,langs:Object,displayNews:Boolean},setup(z){const r=z,p=j({displayNewsFormSending:!1}),w={};(()=>{for(let i=0;i<r.langs.length;i++){const t=r.langs[i],s=r.buttons.find(d=>d.lang==t.short);w[t.short]={name:(s==null?void 0:s.name)??"",url:(s==null?void 0:s.url)??""}}})();const b=(i,t)=>{for(let s=0;s<r.langs.length;s++){const d=r.langs[s];d.short!=i&&(a[d.short][t]=a[i][t])}},a=v({...w}),F=()=>{a.post(route("admin.news_button.store",{onSuccess:()=>{a.reset()},onError:()=>{}}))},c=v({display:r.displayNews,type:"display_news"}),V=()=>{p.displayNewsFormSending=!0,c.post(route("admin.option.store"),{onSuccess:()=>{p.displayNewsFormSending=!1},onError:()=>{p.displayNewsFormSending=!1}})};return(i,t)=>(f(),u(h,null,[o(l(C),{title:"Panel administratorski - News"}),o(W,null,{header:n(()=>[t[2]||(t[2]=e("h2",{class:"text-xl font-semibold leading-tight text-white bg-background"}," News ",-1)),e("div",D,[o(l(O),{href:i.route("admin.dashboard.index")},{default:n(()=>[o(x,{width:"250px",title:"WrÃ³Ä do dashboardu"},{default:n(()=>t[1]||(t[1]=[e("div",{class:"flex gap-[10px] items-center"},"Powrót",-1)])),_:1,__:[1]})]),_:1},8,["href"])])]),default:n(()=>[e("div",L,[e("div",M,[e("div",P,[e("div",T,[t[5]||(t[5]=e("p",{class:"font-medium text-[1.2rem] leading-tight text-neutral-200 mb-2"},'WidocznoÅÄ sekcji "News" na stronie gÅównej',-1)),e("div",Z,[e("div",q,[e("label",A,[U(e("input",{type:"checkbox",class:"sr-only peer","onUpdate:modelValue":t[0]||(t[0]=s=>l(c).display=s)},null,512),[[$,l(c).display]]),t[3]||(t[3]=e("div",{class:"relative w-[52px] h-7 rounded-full peer bg-[#ad369b77] peer-focus:ring-4 peer-focus:ring-[#fd7cea77] dark:peer-focus:ring-purple-800 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:start-[2px] after:bg-white after:rounded-full after:h-6 after:w-6 after:transition-all peer-checked:bg-[#f845dc77] dark:peer-checked:bg-[#f845dc77]"},null,-1)),e("span",G,_(l(c).display?"Widoczne":"Ukryte"),1)]),o(g,{class:"mt-2",message:l(c).errors.display},null,8,["message"])]),e("div",{class:B({"opacity-50":p.displayNewsFormSending})},[o(x,{width:"250px",onClick:V,disabled:p.displayNewsFormSending},{default:n(()=>t[4]||(t[4]=[e("div",{class:"flex gap-[10px] items-center"}," Zapisz zmiany ",-1)])),_:1,__:[4]},8,["disabled"])],2)])]),e("div",H,[e("form",{onSubmit:I(F,["prevent"])},[(f(!0),u(h,null,E(r.langs,(s,d)=>(f(),u(h,{key:d},[e("div",J,[e("p",K,[e("span",Q,_(s.label),1)])]),e("div",R,[e("div",X,[e("div",Y,[e("div",ee,[e("div",se,[o(N,{for:"name_"+s.short},{default:n(()=>t[6]||(t[6]=[y("Nazwa")])),_:2,__:[6]},1032,["for"]),o(S,{id:"name_"+s.short,type:"text",class:"mt-1 block w-full",modelValue:l(a)[s.short].name,"onUpdate:modelValue":m=>l(a)[s.short].name=m,autocomplete:"off",maxlength:"400"},null,8,["id","modelValue","onUpdate:modelValue"]),o(g,{class:"mt-2",message:l(a).errors[s.short+".name"]},null,8,["message"])]),e("div",te,[o(k,{class:"fill-white hover:fill-[#c062d1] cursor-pointer",onClick:m=>b(s.short,"name")},null,8,["onClick"])])])]),e("div",oe,[e("div",le,[e("div",ae,[o(N,{for:"url_"+s.short},{default:n(()=>[t[7]||(t[7]=y("Link ")),e("span",ie,_(s.short),1)]),_:2,__:[7]},1032,["for"]),o(S,{id:"url_"+s.short,type:"text",class:"mt-1 block w-full",modelValue:l(a)[s.short].url,"onUpdate:modelValue":m=>l(a)[s.short].url=m,autocomplete:"off",maxlength:"800"},null,8,["id","modelValue","onUpdate:modelValue"]),o(g,{class:"mt-2",message:l(a).errors[s.short+".url"]},null,8,["message"])]),e("div",ne,[o(k,{class:"fill-white hover:fill-[#c062d1] cursor-pointer",onClick:m=>b(s.short,"url")},null,8,["onClick"])])])])])]),t[8]||(t[8]=e("div",{class:"mb-4"},[e("hr")],-1))],64))),128)),e("div",null,[o(x,{width:"250px"},{default:n(()=>t[9]||(t[9]=[e("div",{class:"flex gap-[10px] items-center"}," Zapisz zmiany ",-1)])),_:1,__:[9]})])],32)])])])])]),_:1})],64))}};export{he 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.