/*! * (C) Ionic http://ionicframework.com - MIT License */ import{w as t}from"./p-9ad82dba.js";import{h as o,a as e,b as n}from"./p-89b61afc.js";import{createGesture as r}from"./p-8ededb41.js";const a=(a,s)=>{let d,i;const c=(t,o,e)=>{if("undefined"==typeof document)return;const n=document.elementFromPoint(t,o);n&&s(n)&&!n.disabled?n!==d&&(f(),m(n,e)):f()},m=(o,e)=>{d=o,i||(i=d);const n=d;t((()=>n.classList.add("ion-activated"))),e()},f=(o=!1)=>{if(!d)return;const e=d;t((()=>e.classList.remove("ion-activated"))),o&&i!==d&&d.click(),d=void 0};return r({el:a,gestureName:"buttonActiveDrag",threshold:0,onStart:t=>c(t.currentX,t.currentY,e),onMove:t=>c(t.currentX,t.currentY,n),onEnd:()=>{f(!0),o(),i=void 0}})};export{a as c}