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