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