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