import{_ as m}from"./AdminLayout-bd13ff9d.js";import{_}from"./PageHeader-8c638686.js";import{s as u,c as n,a as h,b as t,t as a,F as l,r as d,i as b,g as p,o as s,u as f}from"./app-13978987.js";import{_ as y}from"./NoDataFound-bc81d7fa.js";import"./dropdown-45d66330.js";const g={class:"container p-4 sm:p-6"},k={class:"space-y-6"},v={class:"table-responsive rounded-primary"},w={class:"table"},B={width:"10%"},C={width:"80%"},$={width:"10%",class:"text-right"},N={key:0},j={class:"hover"},A=["onClick"],D=p({layout:m}),O=Object.assign(D,{__name:"Index",props:["segments","buttons","roles"],setup(r){const{deleteRow:c}=u();return(e,F)=>(s(),n("main",g,[h(_,{title:e.trans("Admin Roles"),buttons:r.buttons},null,8,["title","buttons"]),t("div",k,[t("div",v,[t("table",w,[t("thead",null,[t("tr",null,[t("th",B,a(e.trans("Name")),1),t("th",C,a(e.trans("Permissions")),1),t("th",$,a(e.trans("Action")),1)])]),r.roles.length?(s(),n("tbody",N,[(s(!0),n(l,null,d(r.roles,o=>(s(),n("tr",{key:o.id},[t("td",null,a(o.name),1),t("td",null,[(s(!0),n(l,null,d(o.permissions,i=>(s(),n("span",{class:"mb-2 mr-1 badge badge-primary",key:i.name},a(i.name),1))),128))]),t("td",null,[t("div",j,[t("a",{href:"javascript:void(0)",onClick:i=>f(c)(e.route("admin.role.destroy",o.id)),class:"btn btn-danger"},a(e.trans("Delete")),9,A)])])]))),128))])):(s(),b(y,{key:1,"for-table":!0}))])])])]))}});export{O as default};
