import{resetComponent as e}from"../../style/index.mjs";import t from"../../theme/util/genComponentStyleHook.mjs";import{merge as n}from"../../theme/util/statistic.mjs";var r=e=>{let{componentCls:t}=e;return{[`${t}-star`]:{position:`relative`,display:`inline-block`,color:`inherit`,cursor:`pointer`,"&:not(:last-child)":{marginInlineEnd:e.marginXS},"> div":{transition:`all ${e.motionDurationMid}, outline 0s`,"&:hover":{transform:e.rateStarHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${e.lineWidth}px dashed ${e.rateStarColor}`,transform:e.rateStarHoverScale}},"&-first, &-second":{color:e.defaultColor,transition:`all ${e.motionDurationMid}`,userSelect:`none`,[e.iconCls]:{verticalAlign:`middle`}},"&-first":{position:`absolute`,top:0,insetInlineStart:0,width:`50%`,height:`100%`,overflow:`hidden`,opacity:0},[`&-half ${t}-star-first, &-half ${t}-star-second`]:{opacity:1},[`&-half ${t}-star-first, &-full ${t}-star-second`]:{color:`inherit`}}}},i=e=>({[`&-rtl${e.componentCls}`]:{direction:`rtl`}}),a=t=>{let{componentCls:n}=t;return{[n]:{...e(t),display:`inline-block`,margin:0,padding:0,color:t.rateStarColor,fontSize:t.rateStarSize,lineHeight:`unset`,listStyle:`none`,outline:`none`,[`&-disabled${n} ${n}-star`]:{cursor:`default`,"&:hover":{transform:`scale(1)`}},...r(t),[`+ ${n}-text`]:{display:`inline-block`,marginInlineStart:t.marginXS,fontSize:t.fontSize},...i(t)}}},o=t(`Rate`,e=>{let{colorFillContent:t}=e;return[a(n(e,{rateStarColor:e[`yellow-6`],rateStarSize:e.controlHeightLG*.5,rateStarHoverScale:`scale(1.1)`,defaultColor:t}))]});export{o as default};