import{I as s}from"./iconify-p99pbjf9.js";import{d as v,e as y,g as b,i as g,C as t,j as e,an as d,t as o,_ as m,P as c,B as a,ax as r,O as C,aw as $}from"./index-DOFLUERq.js";import{_ as w}from"./_plugin-vue_export-helper-DlAUqK2U.js";const N=v({__name:"role_toolbar",props:{id:{},loading:{type:Boolean},isNew:{type:Boolean}},emits:["refresh","delete","go-back","save"],setup(i){const f=i,k=y(),p=()=>{if(f.id){const l=`${k.resolve({name:"RolePermissionManager"}).href}?role=${encodeURIComponent(f.id)}`;window.open(l,"_blank")}};return(n,l)=>(b(),g(e($),{align:"center"},{default:t(()=>[i.isNew?C("",!0):(b(),g(e(d),{key:0,type:"default",size:"medium",onClick:p,title:e(o)("Role Permissions Manager"),class:"header-action-btn"},{icon:t(()=>[a(e(r),null,{default:t(()=>[a(e(s),{icon:"tabler:shield-lock"})]),_:1})]),default:t(()=>[m(" "+c(e(o)("Role Permissions Manager")),1)]),_:1},8,["title"])),a(e(d),{type:"default",size:"medium",onClick:l[0]||(l[0]=u=>n.$emit("refresh")),disabled:i.loading||i.isNew,title:e(o)("Refresh"),class:"header-action-btn"},{icon:t(()=>[a(e(r),null,{default:t(()=>[a(e(s),{icon:"tabler:refresh"})]),_:1})]),_:1},8,["disabled","title"]),a(e(d),{type:"default",size:"medium",onClick:l[1]||(l[1]=u=>n.$emit("delete")),disabled:i.loading||i.isNew,title:e(o)("Delete"),class:"header-action-btn delete-btn"},{icon:t(()=>[a(e(r),null,{default:t(()=>[a(e(s),{icon:"tabler:trash"})]),_:1})]),_:1},8,["disabled","title"]),a(e(d),{type:"default",size:"medium",onClick:l[2]||(l[2]=u=>n.$emit("go-back")),disabled:i.loading},{icon:t(()=>[a(e(r),null,{default:t(()=>[a(e(s),{icon:"tabler:arrow-left"})]),_:1})]),default:t(()=>[m(" "+c(e(o)("Back")),1)]),_:1},8,["disabled"]),a(e(d),{type:"primary",size:"medium",disabled:i.loading,onClick:l[3]||(l[3]=u=>n.$emit("save")),class:"save-btn-brand"},{icon:t(()=>[a(e(r),null,{default:t(()=>[a(e(s),{icon:"tabler:device-floppy"})]),_:1})]),default:t(()=>[m(" "+c(e(o)("Save")),1)]),_:1},8,["disabled"])]),_:1}))}}),I=w(N,[["__scopeId","data-v-940569a6"]]);export{I as default};
