import{L as u}from"./LoadingButton-DuL9lXrz.js";import{T as f}from"./DialogModal-DGhkFqan.js";import{T}from"./DangerButton-BRiD1LeJ.js";import{T as h}from"./SecondaryButton-DNoVYIkM.js";import{_ as x,r as n,o as b,d as w,e,h as a,t as i,a as l,g as c,n as C}from"./app-PFKfXWEI.js";const y={props:["show","title","content","close","action","actionType","actionText","maxWidth"],components:{LoadingButton:u,TecDialogModal:f,TecDangerButton:T,TecSecondaryButton:h},data(){return{loading:!1}},methods:{doAction(){this.loading=!0,setTimeout(()=>{this.loading=!1,this.close()},250),this.action()}}},p=["innerHTML"],B={class:"flex items-center justify-between"};function k(v,o,t,D,s,d){const r=n("tec-secondary-button"),m=n("loading-button"),_=n("tec-dialog-modal");return b(),w(_,{show:t.show,onClose:o[1]||(o[1]=g=>t.close()),"max-width":t.maxWidth||"sm"},{title:e(()=>[a(i(t.title),1)]),content:e(()=>[l("span",{innerHTML:t.content},null,8,p)]),footer:e(()=>[l("div",B,[c(r,{onClick:o[0]||(o[0]=g=>t.close())},{default:e(()=>o[2]||(o[2]=[a(" Cancel ")])),_:1}),c(m,{class:C(["ml-2",{"bg-red-500 hover:bg-red-600":t.actionType=="delete"}]),onClick:d.doAction,loading:s.loading,disabled:s.loading},{default:e(()=>[a(i(t.actionText),1)]),_:1},8,["onClick","loading","disabled","class"])])]),_:1},8,["show","max-width"])}const H=x(y,[["render",k]]);export{H as D};
