1import{d as V,c as i,p as s,a as l,F as f,I as k,B as b,K as c,J as g,r as a,b as w,e as _,o,q as h,s as M}from"./app-0ijXnjiB.js";const N={class:"bg-white dark:bg-gray-900 xl:ml-64"},B={class:"py-8 px-4 max-w-2xl lg:py-16"},C={key:0,class:"flex p-4 mb-4 text-sm text-red-800 rounded-lg bg-red-50 dark:bg-gray-800 dark:text-red-400",role:"alert"},F={class:"mt-1.5 list-disc list-inside"},S={action:"#"},U={class:"flex flex-col gap-16px"},P={key:0,class:"h-30px",version:"1.1",id:"L9",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","enable-background":"new 0 0 0 0","xml:space":"preserve"},K=V({__name:"create",setup(j){const d=a(!1),m=a([]),n=a(""),u=a(""),p=a(""),v=a(0),x=a("");function y(){d.value=!0,w.post("/api/admin/admodules-create",{type:n.value,publication:u.value,title:p.value,subtitle:x.value,price:v.value,lang:localStorage.getItem("lang")||"lt"}).then(r=>{r.status===201&&_.push({path:"/admin/admodules"})}).catch(function(r){m.value=r.response.data.errors,d.value=!1})}return(r,e)=>(o(),i(f,null,[s(M),l("section",N,[l("div",B,[e[10]||(e[10]=l("h2",{class:"mb-4 text-xl font-bold text-gray-900 dark:text-white"},"Naujas reklamos modulis",-1)),Object.keys(m.value).length>0?(o(),i("div",C,[e[6]||(e[6]=l("svg",{class:"flex-shrink-0 inline w-4 h-4 me-3 mt-[2px]","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},[l("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"})],-1)),e[7]||(e[7]=l("span",{class:"sr-only"},"Danger",-1)),l("div",null,[e[5]||(e[5]=l("span",{class:"font-medium"},"Klaida",-1)),l("ul",F,[(o(!0),i(f,null,k(m.value,t=>(o(),i("li",null,h(t),1))),256))])])])):b("",!0),l("form",S,[l("div",U,[s(c,{label:"Tipas",items:[{title:"Reklamos moduliai",id:"ad_module"},{title:"Reklama viršeliuose",id:"ad_cover"},{title:"Reklama teminiuose puslapiuose",id:"ad_theme_page"}],title:"title",value:"id",modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=t=>n.value=t),selectedValue:n.value},null,8,["modelValue","selectedValue"]),s(c,{label:"Publikacija",items:[{title:"Nedelia",id:"Nedelia"},{title:"Pensioner",id:"Pensioner"}],title:"title",value:"id",modelValue:u.value,"onUpdate:modelValue":e[1]||(e[1]=t=>u.value=t),selectedValue:u.value},null,8,["modelValue","selectedValue"]),s(g,{label:"Pavadinimas",type:"text",modelValue:p.value,"onUpdate:modelValue":e[2]||(e[2]=t=>p.value=t)},null,8,["modelValue"]),s(g,{label:"Sub pavadinimas",type:"text",modelValue:x.value,"onUpdate:modelValue":e[3]||(e[3]=t=>x.value=t)},null,8,["modelValue"]),s(g,{label:"Kaina",type:"text",modelValue:v.value,"onUpdate:modelValue":e[4]||(e[4]=t=>v.value=t)},null,8,["modelValue"])]),l("button",{type:"button",onClick:y,class:"bg-[#065f46] inline-flex items-center px-5 py-2.5 mt-4 sm:mt-6 text-sm font-medium text-center text-white bg-primary-700 rounded-lg focus:ring-4 focus:ring-primary-200 dark:focus:ring-primary-900 hover:bg-primary-800"},[e[9]||(e[9]=l("span",null,"Iššsaugoti",-1)),d.value===!0?(o(),i("svg",P,[...e[8]||(e[8]=[l("path",{fill:"#FFF",d:"M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"},[l("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"})],-1)])])):b("",!0)])])])])],64))}});export{K 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.