var h=Object.defineProperty;var d=(a,o,e)=>o in a?h(a,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[o]=e;var l=(a,o,e)=>d(a,typeof o!="symbol"?o+"":o,e);import{j as n}from"./client-By3tlFYA.js";import{r as m}from"./index-TEHZzOO_.js";import{c as x}from"./index-DkCxcZFY.js";import{S as g}from"./done-Bx77AbGW.js";import{a5 as u}from"./useSelectableClick-D9BFU7v4.js";class y extends m.PureComponent{constructor(){super(...arguments);l(this,"handleKeyPress",e=>{const{value:t,checked:s,onToggle:r}=this.props;(e.key==="Enter"||e.key===" ")&&(e.stopPropagation(),e.preventDefault(),r(t,!s))});l(this,"handleChange",e=>{const{value:t,onToggle:s}=this.props;s(t,e.target.checked)})}render(){const{name:e,value:t,checked:s,label:r,labelComponent:i,description:c,multiple:p}=this.props;return n.jsxs("label",{className:"dialog-option poll__option selectable",children:[n.jsx("input",{type:p?"checkbox":"radio",name:e,value:t,checked:s,onChange:this.handleChange}),n.jsx("span",{className:x("poll__input",{active:s,checkbox:p}),tabIndex:0,role:"radio",onKeyPress:this.handleKeyPress,"aria-checked":s,"aria-label":r,children:s&&n.jsx(u,{icon:g})}),i||n.jsxs("span",{className:"poll__option__text",children:[n.jsx("strong",{children:r}),c]})]})}}export{y as O};
//# sourceMappingURL=option-Dtp4z_N6.js.map
