/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
import{b as o}from"./EH5Y2TRK.js";import{H as r,h as i}from"./PGOMURMZ.js";var l={container:"interaction-container"},d=({children:e,disabled:t})=>i`<div class=${r(l.container)} .inert=${t}>${e}</div>`,k=o((e,t)=>(t.onUpdated(()=>f(e)),d));function u(){let{disabled:e}=this;e||HTMLElement.prototype.click.call(this)}function a(e){e.target.disabled&&e.preventDefault()}var c=["mousedown","mouseup","click"];function s(e){e.target.disabled&&(e.stopImmediatePropagation(),e.preventDefault())}var n={capture:!0};function f(e){if(e.disabled){e.el.setAttribute("aria-disabled","true"),e.el.contains(document.activeElement)&&document.activeElement.blur(),v(e);return}m(e),e.el.removeAttribute("aria-disabled")}function v(e){e.el.click=u,b(e.el)}function b(e){e.addEventListener("pointerdown",a,n),c.forEach(t=>e.addEventListener(t,s,n))}function m(e){delete e.el.click,E(e.el)}function E(e){e.removeEventListener("pointerdown",a,n),c.forEach(t=>e.removeEventListener(t,s,n))}export{k as a};
