"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("@aplus-frontend/antdv"),o=require("@aplus-frontend/icon"),m=require("lodash-unified");require("../../config-provider/index.js");const A=require("./constans.js"),v=require("./style/index.js"),f=require("../../config-provider/hooks/use-namespace.js"),N=e.defineComponent({name:"ApLabel",props:A.ApLabelProps(),setup(t){const{b:i,e:a}=f.useNamespace("ap-label"),r=v.default("ap-label"),c=e.useSlots(),n=e.computed(()=>({color:t.iconColor,"font-size":`${t.iconSize}px`,"margin-left":"4px",cursor:"pointer"})),d=(u,l)=>u?e.createVNode(s.Tooltip,{title:u,placement:l.placement||"top",color:l.toolTipBgColor},{default:()=>[l.iconType==="question"&&e.createVNode(o.IconApAdLineAnnotation,{style:n.value},null),l.iconType==="warning"&&e.createVNode(o.IconApAdFillWarn,{style:n.value},null),l.iconType==="line-warning"&&e.createVNode(o.IconApAdLineWarn,{style:n.value},null),l.iconType==="ellipsis"&&e.createVNode(o.IconApAdFillExecution,{style:n.value},null),l.iconType==="success"&&e.createVNode(o.IconApAdFillSuccessful,{style:n.value},null)]}):null;return()=>e.createVNode("div",null,[t.show?e.createVNode("div",{class:[i(),r.value]},[e.createVNode("div",{class:[a("content")]},[e.createVNode(s.Badge,e.mergeProps(m.omit(t,["helpMessage","placement","iconColor"]),{status:t.status?t.status:"default"}),null),c.default?c.default():d(t.helpMessage,t)]),c.custom?e.createVNode("div",{class:[a("custom")]},[c.custom()]):null]):null])}});exports.default=N;
