var e=Object.defineProperty,t=Object.defineProperties,o=Object.getOwnPropertyDescriptors,r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,s=(t,o,r)=>o in t?e(t,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[o]=r;import{_ as l}from"./index.vue_vue_type_script_setup_true_lang-CCGboj8m.js";import{d as a,c,y as p,f as d,z as m,h as u,p as b,e as y,k as x,u as f,m as v,g as _,i as g}from"./index-ip5gDR6L.js";/* empty css                *//* empty css               */import{E as j}from"./index-C9KXwj2c.js";const O={key:0,class:"ml-1"},w=a((C=((e,t)=>{for(var o in t||(t={}))i.call(t,o)&&s(e,o,t[o]);if(r)for(var o of r(t))n.call(t,o)&&s(e,o,t[o]);return e})({},{name:"ArtButtonTable"}),h={__name:"index",props:{type:{},icon:{},iconClass:{},iconColor:{},buttonBgColor:{},text:{},tooltip:{},showText:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const o=e,r=t,i={add:{icon:"ri:add-fill",class:"bg-theme/12 text-theme"},edit:{icon:"ri:pencil-line",class:"bg-secondary/12 text-secondary"},delete:{icon:"ri:delete-bin-5-line",class:"bg-error/12 text-error"},view:{icon:"ri:eye-line",class:"bg-info/12 text-info"},more:{icon:"ri:more-2-fill",class:""}},n=c(()=>{var e;return o.icon||(o.type?null==(e=i[o.type])?void 0:e.icon:"")||""}),s=c(()=>{var e;return o.iconClass||(o.type?null==(e=i[o.type])?void 0:e.class:"")||""}),a=()=>{r("click")};return(t,o)=>{const r=l;return d(),p(f(j),{content:e.tooltip||e.text,placement:"top",disabled:!e.tooltip&&!e.text},{default:m(()=>[u("div",{class:g(["inline-flex items-center justify-center min-w-8 h-8 px-2.5 mr-2.5 text-sm c-p rounded-md",f(s)]),style:_({backgroundColor:e.buttonBgColor,color:e.iconColor}),onClick:a},[b(r,{icon:f(n)},null,8,["icon"]),e.text&&!1!==e.showText?(d(),y("span",O,v(e.text),1)):x("",!0)],6)]),_:1},8,["content","disabled"])}}},t(C,o(h))));var C,h;export{w as _};
