"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../../style/index.js");require("../../theme/internal.js");const o=require("../../theme/util/genComponentStyleHook.js"),l=require("../../theme/util/statistic.js"),n=t=>{const{componentCls:e}=t;return{[`${e}-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 ${e}-star-first, &-half ${e}-star-second`]:{opacity:1},[`&-half ${e}-star-first, &-full ${e}-star-second`]:{color:"inherit"}}}},a=t=>({[`&-rtl${t.componentCls}`]:{direction:"rtl"}}),s=t=>{const{componentCls:e}=t;return{[e]:{...i.resetComponent(t),display:"inline-block",margin:0,padding:0,color:t.rateStarColor,fontSize:t.rateStarSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${e} ${e}-star`]:{cursor:"default","&:hover":{transform:"scale(1)"}},...n(t),[`+ ${e}-text`]:{display:"inline-block",marginInlineStart:t.marginXS,fontSize:t.fontSize},...a(t)}}},c=o.default("Rate",t=>{const{colorFillContent:e}=t,r=l.merge(t,{rateStarColor:t["yellow-6"],rateStarSize:t.controlHeightLG*.5,rateStarHoverScale:"scale(1.1)",defaultColor:e});return[s(r)]});exports.default=c;
