import{s as g,y as h,v,w as p,f as y,dW as E,ai as C,a3 as M,z as i,P as d,Q as o,D as _}from"./index-DT8qTvyx.js";var F=function(r){g(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.handleClick=function(e){var a=this.props,s=a.dispatchEvent,n=a.onClick,l=this.getResolvedEventParams();s(e,l),n==null||n(l)},t.prototype.handleMouseEnter=function(e){var a=this.props.dispatchEvent,s=this.getResolvedEventParams();a(e,s)},t.prototype.handleMouseLeave=function(e){var a=this.props.dispatchEvent,s=this.getResolvedEventParams();a(e,s)},t.prototype.handleClose=function(e){var a=this.props,s=a.dispatchEvent,n=a.onClose,l=this.getResolvedEventParams();s(h(h({},e),{type:"close"}),l),n==null||n(l)},t.prototype.render=function(){var e=this.props,a=e.icon,s=e.displayMode,n=e.color,l=e.className,m=e.closable,c=e.data,u=e.style,b=u===void 0?{}:u,f=this.resolveLabel();return v(a)&&(a=p(a,c)),v(s)&&(s=p(s,c)),v(n)&&(n=p(n,c)),y.createElement(E,{className:l,displayMode:s,color:n,icon:a,closable:m,style:b,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onClose:this.handleClose},f)},t.prototype.resolveLabel=function(){var e=this.props,a=e.label,s=e.data;return C(this.props)||(a?p(a,s,"| raw"):null)},t.prototype.getResolvedEventParams=function(){var e=this.props.data;return M(e,{label:this.resolveLabel()})},t.defaultProps={displayMode:"normal"},i([d,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"handleClick",null),i([d,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"handleMouseEnter",null),i([d,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"handleMouseLeave",null),i([d,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"handleClose",null),t}(y.Component),R=function(r){g(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t=i([_({type:"tag"})],t),t}(F);export{F as TagField,R as TagFieldRenderer};
