import{t as e}from"./axios-m7YkukvY.js";import{et as t}from"./runtime-core.esm-bundler-Babufkcf.js";var n=t({enabled:!1,enforcement:`optional`,allow_override:!0,allow_pin_fallback:!1,fallback_when_unavailable:!0,min_quality:40}),r=t([]),i=t([]),a=!1;function o(){async function t(t=!1){if(!(a&&!t))try{let{data:t}=await e.get(`/fingerprint/settings`);n.value=t.settings||n.value,r.value=t.brands||[],a=!0}catch{}}async function o(){try{let{data:t}=await e.get(`/fingerprint/devices`);i.value=t||[]}catch{}}function s(){return i.value.find(e=>e.is_default&&e.active)||i.value.find(e=>e.active)||i.value[0]||null}async function c(t){let n=t||s()?.id,{data:r}=await e.post(`/fingerprint/capture`,{device_id:n});return{...r,device_id:n}}async function l(t){let{data:n}=await e.post(`/fingerprint/enroll`,t);return n}async function u(t,n){let{data:r}=await e.get(`/fingerprint/enrollments`,{params:{enrollable_type:t,enrollable_id:n}});return r||[]}async function d(t){await e.delete(`/fingerprint/enrollments/`+t)}async function f(t,n,r){let{data:i}=await e.post(`/fingerprint/verify`,{enrollable_type:t,enrollable_id:n,template:r});return i}async function p(t,n=null){let{data:r}=await e.post(`/fingerprint/identify`,{template:t,device_id:n});return r}async function m(t,n){let{data:r}=await e.post(`/fingerprint/payments/`+t+`/verify`,n);return r}return{settings:n,brands:r,devices:i,loadSettings:t,loadDevices:o,defaultDevice:s,capture:c,enroll:l,enrollments:u,removeEnrollment:d,verify:f,identify:p,verifyPayment:m}}export{o as t};