"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),$=require("../_util/colors.js"),g=require("../_util/vue-types/index.js"),y=require("../config-provider/hooks/useConfigInject.js"),S=require("./style/index.js"),s=()=>({prefix:String,color:{type:String},text:g.default.any,placement:{type:String,default:"end"}}),x=o.defineComponent({compatConfig:{MODE:3},name:"ABadgeRibbon",inheritAttrs:!1,props:s(),slots:Object,setup(e,{attrs:u,slots:l}){const{prefixCls:t,direction:i}=y.default("ribbon",e),[d,r]=S.default(t),c=o.computed(()=>$.isPresetColor(e.color,!1)),v=o.computed(()=>[t.value,`${t.value}-placement-${e.placement}`,{[`${t.value}-rtl`]:i.value==="rtl",[`${t.value}-color-${e.color}`]:c.value}]);return()=>{const{class:b,style:f,...m}=u,n={},a={};return e.color&&!c.value&&(n.background=e.color,a.color=e.color),d(o.createVNode("div",{class:`${t.value}-wrapper ${r.value}`,...m},[l.default?.(),o.createVNode("div",{class:[v.value,b,r.value],style:{...n,...f}},[o.createVNode("span",{class:`${t.value}-text`},[e.text||l.text?.()]),o.createVNode("div",{class:`${t.value}-corner`,style:a},null)])]))}}});exports.default=x;exports.ribbonProps=s;
