import{s as x,h as _,c as d,a as s,j as p,u as o,b as e,F as u,r as v,g as w,O as k,o as c,d as y,v as D,t as i}from"./app-13978987.js";import{_ as C}from"./AdminLayout-bd13ff9d.js";import{_ as $}from"./CreatePostCard-92b6d387.js";import{u as j,_ as S}from"./Modal-17c50704.js";import{u as B}from"./designStore-f93d210d.js";import{_ as I}from"./PageHeader-8c638686.js";import"./dropdown-45d66330.js";import"./fabric-1ff51d4a.js";const L={class:"my-3"},O=e("label",{class:"label mb-1"},"Title",-1),V={class:"container flex-grow p-4 sm:p-6"},A={class:"mt-4 flex items-center justify-between"},E={class:"bg-transparent"},F={class:"grid w-full grid-cols-1 gap-6 pb-8 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5"},M={class:"dropdown absolute right-2 top-2","data-placement":"bottom-end"},N=e("div",{class:"dropdown-toggle p-1"},[e("button",{type:"button",class:"h-8 w-8 rounded-full bg-white font-medium shadow-sm dark:bg-slate-800"},[e("i",{class:"bx bx-dots-vertical-rounded text-xl"})])],-1),T={class:"dropdown-content w-32 !overflow-visible p-1"},R={class:"text-sm"},U=["onClick"],q={class:"text-sm"},z=["src"],G={class:"flex items-center justify-between px-4 pt-5"},H={class:"font-semibold"},J={class:"badge dark:bg-secondary-800"},K=e("i",{class:"bx bx-file-blank mr-px text-base"},null,-1),P={class:"text-xs"},Q=w({layout:C}),ae=Object.assign(Q,{__name:"Index",props:["designs","segments"],setup(f){const r=j(),l=B(),{deleteRow:g}=x(),b=()=>{r.$reset(),k.get(route("admin.design.create"))};return(n,a)=>{const m=_("Icon"),h=_("Link");return c(),d(u,null,[s(S,{onAction:b,"action-processing":o(l).form.processing,state:o(r).getState("createDesign"),"header-state":!0,"header-title":"Create Design","action-btn-state":!0},{default:p(()=>[e("div",L,[O,y(e("input",{type:"text","onUpdate:modelValue":a[0]||(a[0]=t=>o(l).form.title=t),class:"input"},null,512),[[D,o(l).form.title]])])]),_:1},8,["action-processing","state"]),e("main",V,[e("div",A,[s(I,{title:"Designs",buttons:[]})]),e("div",null,[e("div",E,[e("div",F,[s($,{classes:"h-80 min-w-[14rem]",text:"Create Design",onAction:a[1]||(a[1]=t=>o(r).open("createDesign"))}),(c(!0),d(u,null,v(f.designs.data,t=>(c(),d("div",{key:t.id,class:"relative flex h-80 min-w-[14rem] flex-col overflow-hidden rounded-2xl border border-gray-50 shadow-md dark:border-gray-600 dark:bg-[#0f172a7e]"},[e("div",M,[N,e("div",T,[s(h,{href:n.route("admin.design.edit",t.id),class:"dropdown-link"},{default:p(()=>[s(m,{icon:"fe:edit"}),e("span",R,i(n.trans("Edit")),1)]),_:2},1032,["href"]),e("button",{class:"dropdown-link",onClick:W=>o(g)(n.route("admin.design.destroy",t.id))},[s(m,{icon:"fe:trash"}),e("span",q,i(n.trans("Delete")),1)],8,U)])]),e("img",{class:"h-64 w-full object-cover",src:t.placeholder,alt:"placeholder"},null,8,z),e("div",G,[e("p",H,i(t.title),1),e("div",J,[K,e("span",P,i(t.status),1)])])]))),128))])])])])],64)}}});export{ae as default};
