import{LitElement as s}from"lit";import{A as t}from"./accessibility/a11y.state.enum.esm.js";import{A as o}from"./accessibility/a11y.property.enum.esm.js";import{R as i}from"./accessibility/role.enum.esm.js";class e extends s{constructor(){super(...arguments),this.BUBBLES=!0,this.COMPOSED=!0,this.CANCELABLE=!1}emit(s,t,o,i,e){const c=new CustomEvent(s,{bubbles:o??this.BUBBLES,cancelable:e??this.CANCELABLE,composed:i??this.COMPOSED,detail:t});return this.dispatchEvent(c),c}}function c(s,e={}){const c=e[i.Role];c&&!s.hasAttribute(i.Role)&&s.setAttribute(i.Role,c);if(!s.hasAttribute(o.AriaLabelledby)&&!s.hasAttribute(o.AriaLabel)){const t=e[o.AriaLabel]??e[o.AriaLabelledby]??(e[o.AriaLabelledby]?s.value:null);t?.trim()&&s.setAttribute(o.AriaLabel,t.trim())}const n=e[t.AriaDisabled];!0===n?s.setAttribute(t.AriaDisabled,"true"):!1===n&&s.removeAttribute(t.AriaDisabled);for(const t of Object.values(o)){const o=e[t];void 0===o||s.hasAttribute(t)||s.setAttribute(t,String(o))}for(const o of Object.values(t)){if(o===t.AriaDisabled)continue;const i=e[o];void 0!==i&&s.setAttribute(o,String(i))}}export{e as N,c as s};
