import{_ as y,o as l,c as a,y as s,p as c,a as r,a0 as i,b,l as o,t as m,f}from"./CmnEfQIC.js";const h=()=>({primaryColor:"#3867a6",primaryColorMedium:"#5b89c9",primaryColorLight:"#eaf1fa",secondaryColor:"#93acc9",secondaryColorMedium:"#adc3db",secondaryColorLight:"#f0f2f7",inputBorderColor:"#9da4b0",pageTitleColor:"#002049",menuTextColor:"#444",fieldLabelColor:"#444",red:"#ba3329",green:"#34a853",orange:"#ed852d",lightGrey:"#f5f7fa",mediumGrey:"#d3dce6",darkGrey:"#444"}),_={name:"AdminButtonElement",props:{color:{type:String,default:""},icon:{type:String},label:{type:String,default:""},mode:{type:String,default:"solid"},type:{type:String,default:"button"},link:{type:String},target:{type:String,default:"_self"},size:{type:String,default:"medium"},overrideStyles:{type:Object,default:()=>{}},disabled:{type:Boolean,default:!1}},emits:["onClick"],computed:{adminStyles(){return h()},buttonClasses(){return["ebm-button",`ebm-button--${this.mode}`,`ebm-button--${this.size}`]},buttonStyles(){const t=this.color?this.color:this.adminStyles.primaryColor;return{opacity:this.disabled?.5:1,cursor:this.disabled?"not-allowed":"pointer",backgroundColor:this.mode==="solid"?t:"white",color:this.mode==="hollow"?t:"white",borderWidth:"1px",borderColor:t,boxShadow:"0 0 2px rgba(255, 255, 255,.1)",...this.overrideStyles}},iconWidth(){return this.size==="large"?22:this.size==="medium"?18:this.size==="small"?16:14}}},g=["type","disabled"],C={class:"content"},S=["innerHTML"],k=["href","target"],w={class:"content"},z={class:"ebm-button-label"};function B(t,d,e,p,L,n){const u=f;return l(),a("div",{class:s(["ebm-button-wrapper",e.icon?"icon":""])},[e.type==="button"||e.type==="submit"?(l(),a("button",{key:0,type:e.type,class:s(n.buttonClasses),style:c(n.buttonStyles),disabled:e.disabled,onClick:d[0]||(d[0]=()=>t.$emit("onClick"))},[r("div",C,[e.label||e.icon?i(t.$slots,"default",{key:0},()=>[e.icon?(l(),b(u,{key:0,icon:e.icon,width:n.iconWidth},null,8,["icon","width"])):o("",!0),e.label?(l(),a("span",{key:1,class:"ebm-button-label",innerHTML:e.label},null,8,S)):o("",!0)],!0):o("",!0),e.label?o("",!0):i(t.$slots,"default",{key:1},void 0,!0)])],14,g)):(l(),a("a",{key:1,href:e.link,class:s(n.buttonClasses),style:c(n.buttonStyles),target:e.target},[r("div",w,[e.label?i(t.$slots,"default",{key:0},()=>[e.icon?(l(),b(u,{key:0,icon:e.icon},null,8,["icon"])):o("",!0),r("span",z,m(e.label),1)],!0):o("",!0),e.label?o("",!0):i(t.$slots,"default",{key:1},void 0,!0)])],14,k))],2)}const v=y(_,[["render",B],["__scopeId","data-v-c7c574f4"]]),T=Object.freeze(Object.defineProperty({__proto__:null,default:v},Symbol.toStringTag,{value:"Module"}));export{T as A,v as _,h as u};