import{c as g,a as v,o as f,N as m,r as a}from"./app-DE5EohoY.js";function h(s,t){return f(),g("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[v("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})])}function p(s){const t=a(s),o=a(!1),l=a(!1),n=a(null),i=async(e,u)=>{o.value=!0;try{const r=await fetch(`/api/public/prayer-times?latitude=${e}&longitude=${u}`);if(!r.ok)throw new Error("Network response was not ok");const d=await r.json();t.value=d,l.value=!0}catch(r){console.error("Error fetching prayer times:",r),n.value="Gagal memuat jadwal lokasi."}finally{o.value=!1}},c=()=>{navigator.geolocation&&(o.value=!0,n.value=null,navigator.geolocation.getCurrentPosition(e=>{i(e.coords.latitude,e.coords.longitude)},e=>{o.value=!1,console.log("Location access denied or error:",e)}))};return m(()=>{c()}),{currentPrayerTimes:t,isLocating:o,usingUserLocation:l,locationError:n,getUserLocation:c}}export{h as r,p as u};
