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