import{_ as b}from"./DuhDFJjj.js";import{u as v}from"./BHvLfWtM.js";import{a as C}from"./Z4eZ-m2s.js";import{_ as L,r as w,d as p,e as r,o as s,w as u,b as t,c as o,t as n,F as P,g as B,f as m,D as c,E as g}from"./Bgmy51Qv.js";import{_ as S}from"./DIkWVjrx.js";import"./7pZkuj9N.js";import"./hSbGpNHU.js";import"./ByXs6QR-.js";import"./D_7E8SMU.js";import"./CNIrc0EA.js";const E={name:"LanguageSetting",data(){return{orderOptions:{created_at:{title:this.$t("category.date")},name:{title:this.$t("user.name")},code:{title:this.$t("setting.code")},direction:{title:this.$t("setting.dir")},default:{title:this.$t("admin.default")},status:{title:this.$t("category.status")}}}},props:{},mixins:[v],components:{ListPage:C},computed:{},methods:{},created(){},async mounted(){}},N={class:"lite-bold"},V={class:"mx-w-300x"},D=["onClick"],F=["onClick"];function I(e,l,_,d,i,z){const $=b,f=w("list-page");return e.$can("language","view")?(s(),p(f,{key:0,ref:"listPage","list-api":"getLanguages","delete-api":"deleteLanguage","route-name":"setting/languages",name:e.$t("profile.langLower"),gate:"language","order-options":i.orderOptions},{table:u(({list:h})=>[t("tr",N,[t("th",null,n(e.$t("user.name")),1),t("th",null,n(e.$t("setting.code")),1),t("th",null,n(e.$t("setting.dir")),1),t("th",null,n(e.$t("admin.default")),1),t("th",null,n(e.$t("category.status")),1),l[0]||(l[0]=t("th",null," ",-1))]),(s(!0),o(P,null,B(h,(a,k)=>(s(),o("tr",{key:k},[t("td",null,[m($,{class:"link",to:`/setting/languages/${a.id}`},{default:u(()=>[t("h5",V,n(a.name),1)]),_:2},1032,["to"])]),t("td",null,n(a.code),1),t("td",null,n(a.direction),1),t("td",{class:c(["status",{active:a.default==1}])},[t("span",null,n(e.getBoolean(a.default)),1)],2),t("td",{class:c(["status",{active:a.status==1}])},[t("span",null,n(e.getStatus(a.status)),1)],2),t("td",null,[e.$can("language","edit")?(s(),o("button",{key:0,onClick:g(y=>e.$refs.listPage.editItem(a.id),["prevent"]),class:"lite-btn"},"Edit ",8,D)):r("",!0),e.$can("language","delete")?(s(),o("button",{key:1,onClick:g(y=>e.$refs.listPage.deleteItem(a.id),["prevent"]),class:"delete-btn lite-btn"},n(e.$t("category.delete")),9,F)):r("",!0)])]))),128))]),_:1},8,["name","order-options"])):r("",!0)}const O=L(E,[["render",I]]),R={__name:"index",setup(e){return(l,_)=>{const d=O,i=S;return s(),p(i,{"active-route":"languages",class:"mb-5"},{rightArea:u(()=>[m(d)]),_:1})}}};export{R as default};
