import {
  g as L,
  m as R,
  ab as O,
  _ as P,
  r as j,
  u as z,
  c as F,
  a as b,
  P as B,
  q as X,
  a0 as U
} from './Dashboard.071f9192.js'
import {
  d as H,
  g as m,
  c as d,
  s as q,
  l as J,
  F as V
} from './vendor.0319ebde.js'
import { W as G } from './index.5693d46f.js'
import { H as K, I as Q, J as Y } from './shallowequal.234d6013.js'
const v = (o, t, l) => {
    const r = O(l)
    return {
      [`${o.componentCls}-${t}`]: {
        color: o[`color${l}`],
        background: o[`color${r}Bg`],
        borderColor: o[`color${r}Border`],
        [`&${o.componentCls}-borderless`]: { borderColor: 'transparent' }
      }
    }
  },
  Z = o =>
    K(o, (t, l) => {
      let { textColor: r, lightBorderColor: a, lightColor: e, darkColor: c } = l
      return {
        [`${o.componentCls}-${t}`]: {
          color: r,
          background: e,
          borderColor: a,
          '&-inverse': {
            color: o.colorTextLightSolid,
            background: c,
            borderColor: c
          },
          [`&${o.componentCls}-borderless`]: { borderColor: 'transparent' }
        }
      }
    }),
  oo = o => {
    const {
        paddingXXS: t,
        lineWidth: l,
        tagPaddingHorizontal: r,
        componentCls: a
      } = o,
      e = r - l,
      c = t - l
    return {
      [a]: P(P({}, j(o)), {
        display: 'inline-block',
        height: 'auto',
        marginInlineEnd: o.marginXS,
        paddingInline: e,
        fontSize: o.tagFontSize,
        lineHeight: `${o.tagLineHeight}px`,
        whiteSpace: 'nowrap',
        background: o.tagDefaultBg,
        border: `${o.lineWidth}px ${o.lineType} ${o.colorBorder}`,
        borderRadius: o.borderRadiusSM,
        opacity: 1,
        transition: `all ${o.motionDurationMid}`,
        textAlign: 'start',
        [`&${a}-rtl`]: { direction: 'rtl' },
        '&, a, a:hover': { color: o.tagDefaultColor },
        [`${a}-close-icon`]: {
          marginInlineStart: c,
          color: o.colorTextDescription,
          fontSize: o.tagIconSize,
          cursor: 'pointer',
          transition: `all ${o.motionDurationMid}`,
          '&:hover': { color: o.colorTextHeading }
        },
        [`&${a}-has-color`]: {
          borderColor: 'transparent',
          [`&, a, a:hover, ${o.iconCls}-close, ${o.iconCls}-close:hover`]: {
            color: o.colorTextLightSolid
          }
        },
        '&-checkable': {
          backgroundColor: 'transparent',
          borderColor: 'transparent',
          cursor: 'pointer',
          [`&:not(${a}-checkable-checked):hover`]: {
            color: o.colorPrimary,
            backgroundColor: o.colorFillSecondary
          },
          '&:active, &-checked': { color: o.colorTextLightSolid },
          '&-checked': {
            backgroundColor: o.colorPrimary,
            '&:hover': { backgroundColor: o.colorPrimaryHover }
          },
          '&:active': { backgroundColor: o.colorPrimaryActive }
        },
        '&-hidden': { display: 'none' },
        [`> ${o.iconCls} + span, > span + ${o.iconCls}`]: {
          marginInlineStart: e
        }
      }),
      [`${a}-borderless`]: {
        borderColor: 'transparent',
        background: o.tagBorderlessBg
      }
    }
  },
  D = L('Tag', o => {
    const { fontSize: t, lineHeight: l, lineWidth: r, fontSizeIcon: a } = o,
      e = Math.round(t * l),
      c = o.fontSizeSM,
      g = e - r * 2,
      C = o.colorFillAlter,
      i = o.colorText,
      n = R(o, {
        tagFontSize: c,
        tagLineHeight: g,
        tagDefaultBg: C,
        tagDefaultColor: i,
        tagIconSize: a - 2 * r,
        tagPaddingHorizontal: 8,
        tagBorderlessBg: o.colorFillTertiary
      })
    return [
      oo(n),
      Z(n),
      v(n, 'success', 'Success'),
      v(n, 'processing', 'Info'),
      v(n, 'error', 'Error'),
      v(n, 'warning', 'Warning')
    ]
  }),
  eo = () => ({
    prefixCls: String,
    checked: { type: Boolean, default: void 0 },
    onChange: { type: Function },
    onClick: { type: Function },
    'onUpdate:checked': Function
  }),
  lo = H({
    compatConfig: { MODE: 3 },
    name: 'ACheckableTag',
    inheritAttrs: !1,
    props: eo(),
    setup(o, t) {
      let { slots: l, emit: r, attrs: a } = t
      const { prefixCls: e } = z('tag', o),
        [c, g] = D(e),
        C = n => {
          const { checked: u } = o
          r('update:checked', !u), r('change', !u), r('click', n)
        },
        i = m(() =>
          F(e.value, g.value, {
            [`${e.value}-checkable`]: !0,
            [`${e.value}-checkable-checked`]: o.checked
          })
        )
      return () => {
        var n
        return c(
          d(
            'span',
            b(b({}, a), {}, { class: [i.value, a.class], onClick: C }),
            [(n = l.default) === null || n === void 0 ? void 0 : n.call(l)]
          )
        )
      }
    }
  }),
  S = lo,
  ro = () => ({
    prefixCls: String,
    color: { type: String },
    closable: { type: Boolean, default: !1 },
    closeIcon: B.any,
    visible: { type: Boolean, default: void 0 },
    onClose: { type: Function },
    onClick: X(),
    'onUpdate:visible': Function,
    icon: B.any,
    bordered: { type: Boolean, default: !0 }
  }),
  h = H({
    compatConfig: { MODE: 3 },
    name: 'ATag',
    inheritAttrs: !1,
    props: ro(),
    slots: Object,
    setup(o, t) {
      let { slots: l, emit: r, attrs: a } = t
      const { prefixCls: e, direction: c } = z('tag', o),
        [g, C] = D(e),
        i = q(!0)
      J(() => {
        o.visible !== void 0 && (i.value = o.visible)
      })
      const n = s => {
          s.stopPropagation(),
            r('update:visible', !1),
            r('close', s),
            !s.defaultPrevented && o.visible === void 0 && (i.value = !1)
        },
        u = m(() => Q(o.color) || Y(o.color)),
        M = m(() =>
          F(e.value, C.value, {
            [`${e.value}-${o.color}`]: u.value,
            [`${e.value}-has-color`]: o.color && !u.value,
            [`${e.value}-hidden`]: !i.value,
            [`${e.value}-rtl`]: c.value === 'rtl',
            [`${e.value}-borderless`]: !o.bordered
          })
        ),
        k = s => {
          r('click', s)
        }
      return () => {
        var s, f, p
        const {
            icon: w = (s = l.icon) === null || s === void 0
              ? void 0
              : s.call(l),
            color: $,
            closeIcon: y = (f = l.closeIcon) === null || f === void 0
              ? void 0
              : f.call(l),
            closable: A = !1
          } = o,
          W = () =>
            A
              ? y
                ? d('span', { class: `${e.value}-close-icon`, onClick: n }, [y])
                : d(U, { class: `${e.value}-close-icon`, onClick: n }, null)
              : null,
          _ = { backgroundColor: $ && !u.value ? $ : void 0 },
          T = w || null,
          I = (p = l.default) === null || p === void 0 ? void 0 : p.call(l),
          N = T ? d(V, null, [T, d('span', null, [I])]) : I,
          E = o.onClick !== void 0,
          x = d(
            'span',
            b(
              b({}, a),
              {},
              { onClick: k, class: [M.value, a.class], style: [_, a.style] }
            ),
            [N, W()]
          )
        return g(E ? d(G, null, { default: () => [x] }) : x)
      }
    }
  })
h.CheckableTag = S
h.install = function(o) {
  return o.component(h.name, h), o.component(S.name, S), o
}
const so = h
export { so as T }
