1import{p as N}from"./B2YF6KS9.js";import{u as J,a0 as A,_ as W}from"./Dr0WBJ_L.js";import{ak as F,n as d,r as X,aa as G,aM as Y,aY as T,bg as t,a_ as ee,aX as j,aZ as P,aw as te,bf as ae,bs as z,bB as V,bt as K,bw as se,aQ as E,b5 as H,bc as Z,aW as Q,aq as oe,aH as ie,a5 as ne,aP as re,aT as q,ai as R,aR as $}from"./B1IWrSUX.js";import{D as le}from"./CPYkWpAm.js";import{f as de}from"./CWlEcPkd.js";import"./Z5ryHFsy.js";const ce={class:"fixed inset-0 z-50 overflow-y-auto"},pe={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},ue={class:"relative inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-7xl sm:w-full"},me={class:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},ge={class:"flex justify-between items-center mb-6"},be={class:"text-xl leading-6 font-semibold text-gray-900"},fe={class:"border-b border-gray-200 mb-6"},ve={class:"-mb-px flex space-x-8"},xe=["onClick"],ye={class:"space-y-6"},he={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},ke={class:"md:col-span-2"},je={class:"flex items-center"},we={class:"space-y-4"},_e={class:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},Ce=["disabled"],Se=F({__name:"PageModal",props:{page:{},isEditing:{type:Boolean}},emits:["close","saved"],setup(B,{emit:w}){const v=J(),b=B,_=w,x=d("basic"),y=d(!1),h=d();let r=null;const O=[{id:"basic",name:"Osnovno",icon:"lucide:info"},{id:"content",name:"Sadržaj",icon:"lucide:file-text"}],i=X({name:"",htmlContent:"",cssContent:"",isPublished:!1,displayOrder:0}),M=async()=>{try{if(y.value=!0,r&&(i.htmlContent=r.getHtml(),i.cssContent=r.getCss()),!i.name?.trim()){v.add({title:"Naziv stranice je obavezan",color:"error"});return}b.isEditing&&b.page?(await N.updatePage(b.page.id,i),v.add({title:"Stranica je uspjeÅ¡no ažurirana",color:"success"})):(await N.createPage(i),v.add({title:"Stranica je uspjeÅ¡no kreirana",color:"success"})),_("saved")}catch(a){if(console.error("Error saving page:",a),a.response?.status===400){const e=a.response.data?.message||"Neispravni podaci";v.add({title:e,color:"error"})}else a.response?.status===409?v.add({title:"Stranica sa tim nazivom veÄ postoji",color:"error"}):v.add({title:"GreÅ¡ka pri snimanju stranice",color:"error"})}finally{y.value=!1}},C=a=>{const e=a.BlockManager;e.add("text-section",{label:"Sekcija teksta",category:"Sadržaj",content:` 2 <div class="text-section" style="padding: 40px 20px; background: #f8f9fa;"> 3 <div class="container" style="max-width: 800px; margin: 0 auto;"> 4 <h2 style="font-size: 2rem; font-weight: bold; margin-bottom: 1rem; color: #333;">Naslov sekcije</h2> 5 <p style="font-size: 1.125rem; line-height: 1.7; color: #666; margin-bottom: 0;"> 6 Dodajte svoj tekst ovde. Možete da ureÄujete ovaj sadržaj direktno klikom na tekst. 7 Ova sekcija je idealna za opise, objaÅ¡njenja ili bilo koji duži sadržaj. 8 </p> 9 </div> 10 </div> 11 `,attributes:{class:"fa fa-text-width"}}),e.add("custom-button",{label:"Dugme",category:"Sadržaj",content:` 12 <div class="button-wrapper" style="text-align: center; padding: 20px;"> 13 <a href="#" class="custom-btn" style=" 14 display: inline-block; 15 padding: 12px 24px; 16 background: #002eff; 17 color: white; 18 text-decoration: none; 19 border-radius: 6px; 20 font-weight: 500; 21 transition: background 0.3s ease; 22 ">Kliknite ovde</a> 23 </div> 24 `,attributes:{class:"fa fa-hand-pointer-o"}}),e.add("info-card",{label:"Info kartica",category:"Sadržaj",content:` 25 <div class="info-card" style=" 26 background: white; 27 border: 1px solid #e5e7eb; 28 border-radius: 8px; 29 padding: 24px; 30 margin: 20px; 31 box-shadow: 0 1px 3px rgba(0,0,0,0.1); 32 "> 33 <div class="card-icon" style=" 34 width: 48px; 35 height: 48px; 36 background: #3b82f6; 37 border-radius: 50%; 38 margin-bottom: 16px; 39 display: flex; 40 align-items: center; 41 justify-content: center; 42 ">
43 <span style="color: white; font-size: 24px;">ð</span> 44 </div> 45 <h3 style="font-size: 1.25rem; font-weight: 600; margin-bottom: 8px; color: #1f2937;">Naslov kartice</h3> 46 <p style="color: #6b7280; line-height: 1.6; margin: 0;"> 47 Kratko objaÅ¡njenje ili opis koji objaÅ¡njava sadržaj ove kartice. 48 </p> 49 </div> 50 `,attributes:{class:"fa fa-id-card-o"}}),e.add("hero-section",{label:"Hero sekcija",category:"Sekcije",content:` 51 <div class="hero-section" style=" 52 background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); 53 color: white; 54 text-align: center; 55 padding: 80px 20px; 56 position: relative; 57 "> 58 <div class="hero-content" style="max-width: 600px; margin: 0 auto;"> 59 <h1 style="font-size: 3rem; font-weight: bold; margin-bottom: 1rem;">DobrodoÅ¡li</h1> 60 <p style="font-size: 1.25rem; margin-bottom: 2rem; opacity: 0.9;"> 61 Kratko objaÅ¡njenje koje privlaÄi pažnju i objaÅ¡njava glavnu poruku. 62 </p> 63 <a href="#" style=" 64 display: inline-block; 65 background: white; 66 color: #667eea; 67 padding: 12px 32px; 68 border-radius: 6px; 69 text-decoration: none; 70 font-weight: 600; 71 transition: transform 0.2s; 72 ">PoÄnite odmah</a> 73 </div> 74 </div> 75 `,attributes:{class:"fa fa-star"}}),e.add("feature-list",{label:"Lista karakteristika",category:"Sadržaj",content:` 76 <div class="feature-list" style="padding: 40px 20px;"> 77 <div class="features-container" style="max-width: 800px; margin: 0 auto;"> 78 <h2 style="text-align: center; font-size: 2rem; margin-bottom: 3rem; color: #1f2937;">Karakteristike</h2> 79 <div class="features-grid" style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem;"> 80 <div class="feature-item" style="text-align: center;"> 81 <div style="font-size: 2rem; margin-bottom: 1rem;">â </div> 82 <h3 style="font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem;">Prva karakteristika</h3> 83 <p style="color: #6b7280; margin: 0;">Opis prve karakteristike</p> 84 </div> 85 <div class="feature-item" style="text-align: center;"> 86 <div style="font-size: 2rem; margin-bottom: 1rem;">ð</div> 87 <h3 style="font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem;">Druga karakteristika</h3> 88 <p style="color: #6b7280; margin: 0;">Opis druge karakteristike</p> 89 </div> 90 <div class="feature-item" style="text-align: center;"> 91 <div style="font-size: 2rem; margin-bottom: 1rem;">â</div> 92 <h3 style="font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem;">TreÄa karakteristika</h3> 93 <p style="color: #6b7280; margin: 0;">Opis treÄe karakteristike</p> 94 </div> 95 </div> 96 </div> 97 </div> 98 `,attributes:{class:"fa fa-list"}}),e.add("quote-block",{label:"Citat",category:"Sadržaj",content:` 99 <div class="quote-block" style=" 100 background: #f8f9fa; 101 border-left: 4px solid #002eff; 102 padding: 30px; 103 margin: 30px 20px; 104 font-style: italic; 105 "> 106 <blockquote style="margin: 0; font-size: 1.25rem; color: #4a5568; line-height: 1.6;"> 107 "Dodajte inspirativni citat ili važnu poruku ovde. Ovo je odliÄan naÄin da istaknete kljuÄne informacije." 108 </blockquote> 109 <footer style="margin-top: 15px; font-style: normal; color: #718096;"> 110 â <cite>Autor citata</cite> 111 </footer> 112 </div> 113 `,attributes:{class:"fa fa-quote-left"}}),e.add("contact-section",{label:"Kontakt sekcija",category:"Sekcije",content:` 114 <div class="contact-section" style="background: #1f2937; color: white; padding: 60px 20px;"> 115 <div class="contact-container" style="max-width: 600px; margin: 0 auto; text-align: center;"> 116 <h2 style="font-size: 2rem; margin-bottom: 1rem;">Kontaktirajte nas</h2> 117 <p style="margin-bottom: 2rem; opacity: 0.8;"> 118 Imate pitanja? Slobodno nas kontaktirajte putem dolje navedenih informacija. 119 </p> 120 <div class="contact-info" style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-top: 2rem;"> 121 <div class="contact-item"> 122 <div style="font-size: 1.5rem; margin-bottom: 0.5rem;">ð§</div> 123 <strong>Email</strong><br>
124 <span style="opacity: 0.8;">[email protected]</span> 125 </div> 126 <div class="contact-item"> 127 <div style="font-size: 1.5rem; margin-bottom: 0.5rem;">ð</div> 128 <strong>Telefon</strong><br> 129 <span style="opacity: 0.8;">+387 11 123 4567</span> 130 </div> 131 </div> 132 </div> 133 </div> 134 `,attributes:{class:"fa fa-phone"}}),e.add("divider",{label:"Razdjelnik",category:"Sadržaj",content:` 135 <div class="divider-wrapper" style="padding: 40px 20px;"> 136 <hr style=" 137 border: none; 138 height: 2px; 139 background: linear-gradient(to right, transparent, #002eff, transparent); 140 margin: 0 auto; 141 max-width: 200px; 142 "> 143 </div> 144 `,attributes:{class:"fa fa-minus"}})},S=a=>{a.Commands.add("edit-code",{run:function(e){const u=e.getHtml(),o=e.getCss();e.Modal.setTitle("Uredi kod").setContent(` 145 <div style="margin-bottom: 20px;"> 146 <label style="display: block; margin-bottom: 5px; font-weight: bold;">HTML:</label> 147 <textarea id="html-editor" style="width:100%; height: 200px; font-family: monospace; border: 1px solid #ddd; padding: 10px; border-radius: 4px;">${u}</textarea> 148 </div> 149 <div style="margin-bottom: 20px;"> 150 <label style="display: block; margin-bottom: 5px; font-weight: bold;">CSS:</label> 151 <textarea id="css-editor" style="width:100%; height: 200px; font-family: monospace; border: 1px solid #ddd; padding: 10px; border-radius: 4px;">${o}</textarea> 152 </div> 153 <div style="text-align: right;"> 154 <button id="apply-code" style="padding: 10px 20px; background: #007cff; color: white; border: none; border-radius: 4px; cursor: pointer; margin-right: 10px;">Primjeni</button> 155 <button id="cancel-code" style="padding: 10px 20px; background: #6c757d; color: white; border: none; border-radius: 4px; cursor: pointer;">Otkaži</button> 156 </div> 157 `).open(),setTimeout(()=>{const c=document.getElementById("apply-code"),m=document.getElementById("cancel-code"),f=document.getElementById("html-editor"),g=document.getElementById("css-editor");c&&f&&g&&c.addEventListener("click",k=>{k.preventDefault(),k.stopPropagation(),e.setComponents(f.value),e.setStyle(g.value),e.Modal.close()}),m&&m.addEventListener("click",k=>{k.preventDefault(),k.stopPropagation(),e.Modal.close()})},100)}}),a.Commands.add("export-template",{run:function(e){const u=e.getHtml(),o=e.getCss();e.Modal.setTitle("Izvezi/Uredi template").setContent(` 158 <div style="display: flex; flex-direction: column; height: 500px;"> 159 <div style="display: flex; margin-bottom: 10px; border-bottom: 1px solid #ddd; padding-bottom: 10px;"> 160 <button id="tab-html" class="code-tab" style="padding: 10px 20px; margin-right: 5px; background: #007cff; color: white; border: none; border-radius: 4px 4px 0 0; cursor: pointer;">HTML</button> 161 <button id="tab-css" class="code-tab" style="padding: 10px 20px; background: #f5f5f5; border: none; border-radius: 4px 4px 0 0; cursor: pointer; margin-right: auto;">CSS</button> 162 <button id="apply-changes" style="padding: 10px 20px; background: #28a745; color: white; border: none; border-radius: 4px; cursor: pointer; margin-right: 10px;">Primjeni izmjene</button> 163 <button id="close-export" style="padding: 10px 20px; background: #6c757d; color: white; border: none; border-radius: 4px; cursor: pointer;">Zatvori</button> 164 </div> 165 <textarea id="code-html" style="flex: 1; width: 100%; font-family: 'Courier New', monospace; border: 1px solid #ddd; padding: 10px; border-radius: 4px; resize: none;" placeholder="HTML kod...">${u}</textarea> 166 <textarea id="code-css" style="flex: 1; width: 100%; font-family: 'Courier New', monospace; border: 1px solid #ddd; padding: 10px; border-radius: 4px; resize: none; display: none;" placeholder="CSS kod...">${o}</textarea> 167 </div> 168 `).open(),setTimeout(()=>{const c=document.getElementById("tab-html"),m=document.getElementById("tab-css"),f=document.getElementById("code-html"),g=document.getElementById("code-css"),k=document.getElementById("apply-changes"),U=document.getElementById("close-export");c?.addEventListener("click",p=>{p.preventDefault(),p.stopPropagation(),c&&m&&f&&g&&(c.style.background="#007cff",c.style.color="white",m.style.background="#f5f5f5",m.style.color="black",f.style.display="block",g.style.display="none")}),m?.addEventListener("click",p=>{p.preventDefault(),p.stopPropagation(),c&&m&&f&&g&&(m.style.background="#007cff",m.style.color="white",c.style.background="#f5f5f5",c.style.color="black",g.style.display="block",f.style.display="none")}),k?.addEventListener("click",p=>{p.preventDefault(),p.stopPropagation(),f&&g&&(e.setComponents(f.value),e.setStyle(g.value),e.Modal.close())}),U?.addEventListener("click",p=>{p.preventDefault(),p.stopPropagation(),e.Modal.close()})},100)}})},I=a=>
168{a.Panels.addPanel({id:"panel-top",el:".panel__top"}),a.Panels.addPanel({id:"basic-actions",el:".panel__basic-actions",buttons:[{id:"visibility",active:!0,className:"btn-toggle-borders",label:"<u>B</u>",command:"sw-visibility"},{id:"show-code",className:"btn-show-code",label:"Code",command:"edit-code"},{id:"export",className:"btn-open-export",label:"Export",command:"export-template"}]})},L=async()=>{if(h.value)try{const{default:a}=await A(async()=>{const{default:u}=await import("./CWUPsJrt.js");return{default:u}},[],import.meta.url),{default:e}=await A(async()=>{const{default:u}=await import("./BMZLaWF5.js").then(o=>o.i);return{default:u}},[],import.meta.url);r=a.init({container:"#gjs-editor",height:"500px",width:"auto",storageManager:!1,components:i.htmlContent||'<div class="txt-center">Kliknite ovde da poÄnete ureÄivanje</div>',style:".txt-center { text-align: center; padding: 20px; color: #666; }",plugins:[e],pluginsOpts:{"grapesjs-blocks-basic":{blocks:["column1","column2","column3","column3-7","text","link","image","video","map"],flexGrid:!0,stylePrefix:"gjs-",addBasicStyle:!0,category:"Basic"}}}),C(r),S(r),I(r),i.htmlContent&&r.setComponents(i.htmlContent),i.cssContent&&r.setStyle(i.cssContent)}catch(a){console.error("Error initializing GrapesJS:",a),v.add({title:"GreÅ¡ka pri uÄitavanju editora",color:"error"})}},D=()=>{if(r)try{r.destroy(),r=null}catch(a){console.error("Error destroying GrapesJS:",a)}};return G(x,async a=>{a==="content"?(await oe(),L()):D()}),G(()=>b.page,a=>{a?Object.assign(i,{name:a.name||"",htmlContent:a.htmlContent||"",cssContent:a.cssContent||"",isPublished:a.isPublished||!1,displayOrder:a.displayOrder||0}):Object.assign(i,{name:"",htmlContent:"",cssContent:"",isPublished:!1,displayOrder:0})},{immediate:!0}),Y(()=>{D()}),(a,e)=>{const u=H;return E(),T("div",ce,[t("div",pe,[t("div",{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity",onClick:e[0]||(e[0]=o=>a.$emit("close"))}),t("div",ue,[t("form",{onSubmit:ee(M,["prevent"])},[t("div",me,[t("div",ge,[t("h3",be,j(B.isEditing?"Uredi stranicu":"Nova stranica"),1),t("button",{type:"button",onClick:e[1]||(e[1]=o=>a.$emit("close")),class:"text-gray-400 hover:text-gray-600"},[P(u,{name:"lucide:x",class:"w-6 h-6"})])]),t("div",fe,[t("nav",ve,[(E(),T(te,null,ae(O,o=>t("button",{key:o.id,type:"button",onClick:c=>x.value=o.id,class:Z(["py-2 px-1 border-b-2 font-medium text-sm whitespace-nowrap",x.value===o.id?"border-blue-500 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"])},[P(u,{name:o.icon,class:"w-4 h-4 inline mr-2"},null,8,["name"]),Q(" "+j(o.name),1)],10,xe)),64))])]),t("div",ye,[z(t("div",he,[t("div",ke,[e[6]||(e[6]=t("label",{class:"block text-sm font-medium text-gray-700 mb-1"}," Naziv stranice * ",-1)),z(t("input",{"onUpdate:modelValue":e[2]||(e[2]=o=>i.name=o),type:"text",required:"",class:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500",placeholder:"Unesite naziv stranice"},null,512),[[K,i.name]])]),t("div",null,[e[7]||(e[7]=t("label",{class:"block text-sm font-medium text-gray-700 mb-1"}," Redosljed prikaza ",-1)),z(t("input",{"onUpdate:modelValue":e[3]||(e[3]=o=>i.displayOrder=o),type:"number",min:"0",class:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"},null,512),[[K,i.displayOrder]])]),t("div",je,[z(t("input",{"onUpdate:modelValue":e[4]||(e[4]=o=>i.isPublished=o),type:"checkbox",class:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"},null,512),[[se,i.isPublished]]),e[8]||(e[8]=t("label",{class:"ml-2 block text-sm text-gray-900"}," Objavi stranicu ",-1))])],512),[[V,x.value==="basic"]]),z(t("div",we,[t("div",null,[e[9]||(e[9]=t("label",{class:"block text-sm font-medium text-gray-700 mb-2"}," HTML sadržaj ",-1)),e[10]||(e[10]=t("div",{class:"panel__top",style:{"margin-bottom":"10px",padding:"8px",background:"#f8f9fa","border-radius":"4px",border:"1px solid #dee2e6"}},[t("div",{class:"panel__basic-actions"})],-1)),t("div",{ref_key:"grapesEditor",ref:h,id:"gjs-editor",style:{height:"500px",border:"1px solid #ddd"}},null,512)])],512),[[V,x.value==="content"]])])]),t("div",_e,[t("button",{type:"submit",disabled:y.value,class:"w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-600 text-base font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto
168sm:text-sm disabled:opacity-50"},j(y.value?"Snimam...":B.isEditing?"Ažuriraj":"Kreiraj"),9,Ce),t("button",{type:"button",onClick:e[5]||(e[5]=o=>a.$emit("close")),class:"mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"}," Otkaži ")])],32)])])])}}}),ze=Object.assign(W(Se,[["__scopeId","data-v-4e13a05f"]]),{__name:"PagesPageModal"}),Pe={class:"min-h-screen bg-gray-50"},Ee={class:"p-8"},Be={class:"mb-8"},Oe={class:"flex justify-between items-center"},Me={class:"flex space-x-4"},De={class:"flex items-center"},$e={class:"flex-shrink-0 h-10 w-10"},Ne={class:"h-10 w-10 rounded-lg bg-blue-100 flex items-center justify-center"},Te={class:"ml-4"},Ie={class:"text-sm font-medium text-gray-900"},Le={class:"text-sm text-gray-500"},Ue={class:"text-sm text-gray-900"},He={class:"text-sm text-gray-900"},Ae={key:1,class:"fixed inset-0 bg-gray-500 bg-opacity-75 flex items-center justify-center z-50"},Fe=F({__name:"index",setup(B){const w=J(),v=d([]),b=d(!1),_=d(!1),x=d(null),y=d(!1),h=d(1),r=d(25),O=d(0),i=d(0),M=d(""),C=d("displayOrder"),S=d("asc"),I=[{field:"name",label:"Naziv",sortable:!0,width:"300px"},{field:"isPublished",label:"Status",sortable:!0,width:"120px"},{field:"displayOrder",label:"Redosljed",sortable:!0,width:"100px"},{field:"createdAt",label:"Datum kreiranja",sortable:!0,width:"150px"}],L=[{field:"name",label:"Naziv",type:"text"},{field:"slug",label:"Slug",type:"text"},{field:"isPublished",label:"Objavljeno",type:"boolean"}],D=[{field:"displayOrder",label:"Redosljed"},{field:"name",label:"Naziv"},{field:"createdAt",label:"Datum kreiranja"}],a=async()=>{try{b.value=!0;const s=await N.getPages({page:h.value,pageSize:r.value,sortBy:C.value,sortDirection:S.value,search:M.value});s.success&&s.data&&(v.value=s.data,O.value=s.totalCount,i.value=s.totalPages)}catch(s){console.error("Error loading pages:",s),w.add({title:"GreÅ¡ka pri uÄitavanju stranica",color:"error"})}finally{b.value=!1}},e=s=>{h.value=s,a()},u=s=>{C.value=s.sortBy,S.value=s.sortDirection,h.value=1,a()},o=s=>{h.value=1,a()},c=s=>{M.value=s,h.value=1,a()},m=()=>{x.value=null,y.value=!1,_.value=!0},f=s=>{x.value={...s},y.value=!0,_.value=!0},g=()=>{_.value=!1,x.value=null,y.value=!1},k=()=>{g(),a(),w.add({title:y.value?"Stranica je uspjeÅ¡no ažurirana":"Stranica je uspjeÅ¡no kreirana",color:"success"})},U=async s=>{if(confirm(`Da li ste sigurni da želite da obriÅ¡ete stranicu "${s.name}"?`))try{b.value=!0,await N.deletePage(s.id),w.add({title:"Stranica je uspjeÅ¡no obrisana",color:"success"}),a()}catch(l){console.error("Error deleting page:",l),w.add({title:"GreÅ¡ka pri brisanju stranice",color:"error"})}finally{b.value=!1}},p=s=>s?de(new Date(s),"dd.MM.yyyy"):"N/A";return ie(()=>{a()}),ne({title:"Stranice - Administracija"}),(s,l)=>(E(),T("div",Pe,[t("div",Ee,[t("div",Be,[t("div",Oe,[l[5]||(l[5]=t("div",null,[t("h1",{class:"text-3xl font-bold text-gray-900"},"Stranice"),t("p",{class:"text-gray-600 mt-1"},"Upravljanje stranicama na sajtu")],-1)),t("div",Me,[t("button",{onClick:m,class:"inline-flex items-center px-4 py-2 bg-green-600 text-white text-sm font-medium rounded-lg hover:bg-green-700 transition-colors"},[P(R(H),{name:"lucide:plus",class:"w-4 h-4 mr-2"}),l[4]||(l[4]=Q(" Nova stranica ",-1))])])])]),P(le,{columns:I,items:v.value,"total-items":O.value,"current-page":h.value,"total-pages":i.value,"page-size":r.value,loading:b.value,"sort-by":C.value,"sort-direction":S.value,"filter-options":L,"sort-options":D,"key-field":"id","show-actions":!0,"no-data-text":"Nema stranica za prikaz","onUpdate:currentPage":l[0]||(l[0]=n=>h.value=n),"onUpdate:pageSize":l[1]||(l[1]=n=>r.value=n),"onUpdate:sortBy":l[2]||(l[2]=n=>C.value=n),"onUpdate:sortDirection":l[3]||(l[3]=n=>S.value=n),onPageChange:e,onSortChange:u,onFilterChange:o,onSearch:c,onEdit:f,onDelete:U},{"cell-name":$(({item:n})=>[t("div",De,[t("div",$e,[t("div",Ne,[P(R(H),{name:"lucide:file-text",class:"h-5 w-5 text-blue-600"})])]),t("div",Te,[t("div",Ie,j(n.name),1),t("div",Le,j(n.slug),1)])])]),"cell-isPublished":$(({item:n})=>[t("span",{class:Z(["inline-flex px-2 py-1 text-xs font-semibold rounded-full",n.isPublished?"bg-green-100 text-green-800":"bg-gray-100 text-gray-800"])},j(n.isPublished?"Objavljeno":"Skriveno"),3)]),"cell-displayOrder":$(({item:n})=>[t("span",Ue,j(n.displayOrder),1)]),"cell-createdAt":$(({item:n})=>[t("span",He,j(p(n.createdAt)),1)]),_:1},8,["items","total-items","current-page","total-pages","page-size","loading","sort-by","sort-direction"])]),_.value?(E(),re(ze,{key:0,page:x.value,"is-editing":y.value,onClose:g,onSaved:k},null,8,["page","is-editing"])):q("",!0),b.value?(E(),T("div",Ae,[...l[6]||(l[6]=[t("div",{class:"bg-white rounded-lg p-6"},[t("div",{class:"flex items-center"},[t("div",{class:"animate-spin rounded-full h-6 w-6 border-b-2 border-blue-600 mr-3"}),t("span",null,"UÄitavanje...")])],-1)])])):q("",!0)]))}});
168export{Fe 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.