import{defineComponent as c,computed as a,createVNode as l}from"vue";import d from"../_util/props-util/initDefaultProps.mjs";import{tuple as f,booleanType as v}from"../_util/type.mjs";import n from"../_util/vue-types/index.mjs";import p from"../config-provider/hooks/useConfigInject.mjs";const b=()=>({prefixCls:String,color:String,dot:n.any,pending:v(),position:n.oneOf(f("left","right","")).def(""),label:n.any}),I=c({compatConfig:{MODE:3},name:"ATimelineItem",props:d(b(),{color:"blue",pending:!1}),slots:Object,setup(t,{slots:o}){const{prefixCls:e}=p("timeline",t),u=a(()=>({[`${e.value}-item`]:!0,[`${e.value}-item-pending`]:t.pending})),i=a(()=>/blue|red|green|gray/.test(t.color||"")?void 0:t.color||"blue"),s=a(()=>({[`${e.value}-item-head`]:!0,[`${e.value}-item-head-${t.color||"blue"}`]:!i.value}));return()=>{const{label:r=o.label?.(),dot:m=o.dot?.()}=t;return l("li",{class:u.value},[r&&l("div",{class:`${e.value}-item-label`},[r]),l("div",{class:`${e.value}-item-tail`},null),l("div",{class:[s.value,!!m&&`${e.value}-item-head-custom`],style:{borderColor:i.value,color:i.value}},[m]),l("div",{class:`${e.value}-item-content`},[o.default?.()])])}}});export{I as default,b as timelineItemProps};
