import{a as L}from"./Z4eZ-m2s.js";import{O as v,j as c,d as x,e as p,w as P,m as e,o as l,b as t,c as r,t as a,F as D,g as S,G as N,H as R,K as V,D as E,E as k}from"./Bgmy51Qv.js";import{u as F}from"./CYl1ofbh.js";import{u as H}from"./BE7GDBwC.js";import"./7pZkuj9N.js";import"./BHvLfWtM.js";import"./hSbGpNHU.js";import"./DuhDFJjj.js";import"./ByXs6QR-.js";import"./D_7E8SMU.js";import"./DKgjlGGV.js";const I={class:"lite-bold"},M={class:"w-50x mx-w-50x"},O={class:"w-50x mx-w-50x"},U=["value"],j=["onClick"],z=["onClick"],et={__name:"index",setup(A){const{t:i}=v(),_=c({created_at:{title:i("category.date")},status:{title:i("category.status")},route_pattern:{title:i("title.rParam")}});c(!1),c([]);const{getStatus:h}=H(),{cbList:u,deleteBulk:f,listPageRef:g,setItemList:y,checkAll:m,editNode:b,deleteNode:C}=F();return(s,n)=>{const $=L;return s.$can("header_link","view")?(l(),x($,{key:0,ref_key:"listPageRef",ref:g,"list-api":"getCustomScripts","delete-api":"deleteCustomScript","route-name":"custom-scripts",name:s.$t("title.cScript"),gate:"header_link","order-options":e(_),onDeleteBulk:e(f),onList:e(y)},{table:P(({list:w})=>[t("tr",I,[t("th",M,[t("input",{type:"checkbox",onChange:n[0]||(n[0]=(...o)=>e(m)&&e(m)(...o))},null,32)]),t("th",null,a(s.$t("title.rParam")),1),t("th",null,a(s.$t("category.status")),1),n[2]||(n[2]=t("th",null,null,-1))]),(l(!0),r(D,null,S(w,(o,B)=>(l(),r("tr",{key:B},[t("td",O,[N(t("input",{type:"checkbox",value:o.id,"onUpdate:modelValue":n[1]||(n[1]=d=>R(u)?u.value=d:null)},null,8,U),[[V,e(u)]])]),t("td",null,[t("span",null,a(o.route_pattern),1)]),t("td",{class:E(["status",{active:o.status==1}])},[t("span",null,a(e(h)(o.status)),1)],2),t("td",null,[s.$can("header_link","edit")?(l(),r("button",{key:0,onClick:k(d=>e(b)(o),["prevent"]),class:"lite-btn"},a(s.$t("category.edit")),9,j)):p("",!0),s.$can("header_link","delete")?(l(),r("button",{key:1,onClick:k(d=>e(C)(o),["prevent"]),class:"delete-btn lite-btn"},a(s.$t("category.delete")),9,z)):p("",!0)])]))),128))]),_:1},8,["name","order-options","onDeleteBulk","onList"])):p("",!0)}}};export{et as default};
