// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0-or-later
// @source: https://gitlab.com/soapbox-pub/ditto/-/tree/f0a3877c
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/esm-Bq31Fdqw.js","assets/preload-helper-CZgWQFsJ.js","assets/dist-DQ_zK-Nr.js"])))=>i.map(i=>d[i]);
import{t as e}from"./preload-helper-CZgWQFsJ.js";import{t}from"./dist-DQ_zK-Nr.js";var n=null;function r(){return n||=e(()=>import(`./esm-Bq31Fdqw.js`),__vite__mapDeps([0,1,2])),n}async function i(e){let{Haptics:t,ImpactStyle:n}=await r();await t.impact({style:n[e]})}async function a(e){let{Haptics:t,NotificationType:n}=await r();await t.notification({type:n[e]})}async function o(){let{Haptics:e}=await r();t.getPlatform()===`android`?await e.vibrate({duration:10}):(await e.selectionStart(),await e.selectionChanged(),await e.selectionEnd())}function s(e){try{navigator.vibrate?.(e)}catch{}}function c(e,t){console.warn(`[haptics] ${e} failed:`,t)}function l(){t.isNativePlatform()?i(`Light`).catch(e=>c(`impactLight`,e)):s(10)}function u(){t.isNativePlatform()?i(`Medium`).catch(e=>c(`impactMedium`,e)):s(20)}function d(){t.isNativePlatform()?i(`Heavy`).catch(e=>c(`impactHeavy`,e)):s(30)}function f(){t.isNativePlatform()?a(`Success`).catch(e=>c(`notificationSuccess`,e)):s(15)}function p(){t.isNativePlatform()?o().catch(e=>c(`selectionChanged`,e)):s(5)}export{p as a,f as i,l as n,u as r,d as t};
// @license-end
