"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),y=require("../_util/vue-types/index.js"),f={value:Number,index:Number,prefixCls:String,allowHalf:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},character:y.default.any,characterRender:Function,focused:{type:Boolean,default:void 0},count:Number,onClick:Function,onHover:Function},C=r.defineComponent({compatConfig:{MODE:3},name:"Star",inheritAttrs:!1,props:f,emits:["hover","click"],setup(l,{emit:s}){const v=e=>{const{index:n}=l;s("hover",e,n)},x=e=>{const{index:n}=l;s("click",e,n)},h=e=>{const{index:n}=l;e.keyCode===13&&s("click",e,n)},m=r.computed(()=>{const{prefixCls:e,index:n,value:t,allowHalf:i,focused:a}=l,c=n+1;let o=e;return t===0&&n===0&&a?o+=` ${e}-focused`:i&&t+.5>=c&&t<c?(o+=` ${e}-half ${e}-active`,a&&(o+=` ${e}-focused`)):(o+=c<=t?` ${e}-full`:` ${e}-zero`,c===t&&a&&(o+=` ${e}-focused`)),o});return()=>{const{disabled:e,prefixCls:n,characterRender:t,character:i,index:a,count:c,value:o}=l,u=typeof i=="function"?i({disabled:e,prefixCls:n,index:a,count:c,value:o}):i;let d=r.createVNode("li",{class:m.value},[r.createVNode("div",{onClick:e?null:x,onKeydown:e?null:h,onMousemove:e?null:v,role:"radio","aria-checked":o>a?"true":"false","aria-posinset":a+1,"aria-setsize":c,tabindex:e?-1:0},[r.createVNode("div",{class:`${n}-first`},[u]),r.createVNode("div",{class:`${n}-second`},[u])])]);return t&&(d=t(d,l)),d}}});exports.default=C;exports.starProps=f;
