import{e as s,m as i,n as o,o as a,b as n,F as d,c as b,f as g,t as u,r as y,a as C}from"./vue.esm-bundler.js?ver=1.4.1";import{_ as l}from"./_plugin-vue_export-helper.js?ver=1.4.1";import{_ as S}from"./DynamicIcon.js?ver=1.4.1";import{S as p}from"./Str.js?ver=1.4.1";import{t as e}from"./Translator.js?ver=1.4.1";const k={name:"Card",props:{border:{type:Boolean}}};function x(r,m,t,f,h,c){return a(),s("div",{class:o(`fct-card ${t.border?"fct-card-border":""}`)},[i(r.$slots,"default")],2)}const O=l(k,[["render",x]]),$={name:"CardHeader",components:{DynamicIcon:S},props:{title:{type:String},text:{type:String},border_bottom:{type:Boolean},icon:{type:String},title_size:{type:String},img:{type:String}}},B={key:0,class:"flex-1"},v=["src"],D={key:1,class:"fct-card-header-text"},z={key:1,class:"fct-card-header-actions"};function I(r,m,t,f,h,c){const _=y("DynamicIcon");return a(),s("div",{class:o(`fct-card-header ${t.border_bottom?"border-bottom":""}`)},[t.title||t.text||r.$slots.title?(a(),s("div",B,[t.title||t.text?(a(),s(d,{key:0},[t.title?(a(),s("h2",{key:0,class:o(`fct-card-header-title ${t.title_size?"is-"+t.title_size:""}`)},[t.icon?(a(),b(_,{key:0,name:t.icon},null,8,["name"])):n("",!0),t.img?(a(),s("img",{key:1,src:t.img,alt:""},null,8,v)):n("",!0),g(" "+u(t.title),1)],2)):n("",!0),t.text?(a(),s("p",D,u(t.text),1)):n("",!0)],64)):n("",!0),r.$slots.title?i(r.$slots,"title",{key:1}):n("",!0)])):n("",!0),r.$slots.action?(a(),s("div",z,[i(r.$slots,"action")])):n("",!0),i(r.$slots,"default")],2)}const U=l($,[["render",I]]),w={name:"CardBody"},P={class:"fct-card-body"};function H(r,m,t,f,h,c){return a(),s("div",P,[i(r.$slots,"default")])}const W=l(w,[["render",H]]),T={name:"Badge",components:{DynamicIcon:S},props:{status:String,text:{type:String,default:null,required:!1},hideIcon:{type:Boolean,default:!1},size:String,highContrast:{type:Boolean,default:!1},type:String,icon:String},computed:{Str(){return p},computedStatus(){return this.status||this.type},badgeType(){switch(this.computedStatus){case"completed":case"paid":case"active":case"publish":case"shipped":case"success":case"licensed":case"succeeded":return"success";case"failed":case"error":case"canceled":case"expired":return"danger";case"blue":case"partially_paid":case"intended":return"blue";case"scheduled":case"on-hold":case"pending":case"unpaid":case"warning":case"processing":case"future":return"warning";case"inactive":return"warning";case"dispute":return"warning";default:return"info"}},badgeSize(){return this.size?this.size:""},HighContrast(){return this.highContrast?"is-high-contrast":""}},methods:{getStatusText(){switch(this.computedStatus){case"completed":return e("Completed");case"paid":return e("Paid");case"active":return e("Active");case"publish":return e("Published");case"draft":return e("Draft");case"shipped":return e("Shipped");case"success":return e("Success");case"licensed":return e("Licensed");case"succeeded":return e("Succeeded");case"failed":return e("Failed");case"error":return e("Error");case"canceled":return e("Canceled");case"expired":return e("Expired");case"partially_paid":return e("Partially Paid");case"intended":return e("Intended");case"scheduled":return e("Scheduled");case"on-hold":return e("On Hold");case"pending":return e("Pending");case"unpaid":return e("Unpaid");case"warning":return e("Warning");case"processing":return e("Processing");case"future":return e("Future");case"inactive":return e("Inactive");case"dispute":return e("Dispute");case"disabled":return e("Disabled");case"beta":return e("Beta");default:return p.headline(this.computedStatus)}}}},F={key:0};function E(r,m,t,f,h,c){const _=y("DynamicIcon");return a(),s("span",{class:o(`badge ${c.badgeType} ${c.badgeSize} ${c.HighContrast}`)},[t.status||t.text?(a(),s(d,{key:0},[t.icon?(a(),s("span",F,[C(_,{name:t.icon},null,8,["name"])])):n("",!0),t.text?(a(),s(d,{key:1},[g(u(t.text),1)],64)):(a(),s(d,{key:2},[g(u(c.getStatusText()),1)],64))],64)):i(r.$slots,"default",{key:1})],2)}const j=l(T,[["render",E]]);export{j as B,U as C,W as a,O as b};
