"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("primereact/utils"),n=require("primereact/tooltip");function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=o(t);function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var n=0;nt.props.value,"pi pi-star-fill":n<=t.props.value});return r.default.createElement("span",{className:o,onClick:function(e){return t.rate(e,n)},key:n,tabIndex:t.getFocusIndex(),onKeyDown:function(e){return t.onStarKeyDown(e,n)}})}))}},{key:"renderCancelIcon",value:function(){return this.props.cancel?r.default.createElement("span",{className:"p-rating-icon p-rating-cancel pi pi-ban",onClick:this.clear,tabIndex:this.getFocusIndex(),onKeyDown:this.onCancelKeyDown}):null}},{key:"render",value:function(){var t=this,n=e.classNames("p-rating",{"p-disabled":this.props.disabled,"p-rating-readonly":this.props.readOnly},this.props.className),o=this.renderCancelIcon(),i=this.renderStars();return r.default.createElement("div",{ref:function(e){return t.element=e},id:this.props.id,className:n,style:this.props.style},o,i)}}])&&l(y.prototype,d),v&&l(y,v),Object.defineProperty(y,"prototype",{writable:!1}),m}();y(v,"defaultProps",{id:null,value:null,disabled:!1,readOnly:!1,stars:5,cancel:!0,style:null,className:null,tooltip:null,tooltipOptions:null,onChange:null}),exports.Rating=v;