import{a as f,g,i as h,aH as b,H as A,j as t,_ as l,f as v,bG as _}from"./main-634.js";import{F as o}from"./bf-767-388.js";import{S as x}from"./bf-982-242.js";import"./bf-25-81.js";import"./bf-497-246.js";import"./bf-641-107.js";import"./bf-400-72.js";import"./bf-438-114.js";const L=[{value:"disable",label:"Disabled"},{value:"page-load",label:"On Page Load"},{value:"on-click",label:"On Button Click"}];function H(){var r;const{css:s}=f(),{fieldKey:a}=g(),[i,n]=h(b);if(!a)return null;const d=A(i[a]),u=((r=d.config)==null?void 0:r.autoLocate)||"disable",m=({target:{value:e}})=>{const c=v(i,p=>{p[a].config.autoLocate=e});n(c),_({event:`Address auto-locate set to '${e}': ${d.lbl||a}`,type:"address_autolocate_changed",state:{fields:c,fldKey:a}})};return t.jsx(x,{id:"addr-auto-locate-stng",title:l("Auto Locate"),className:s(o.fieldSection,o.hover_tip),tip:l("Use the browser geolocation API to auto-fill the address. Requires HTTPS."),isPro:!0,open:!0,children:t.jsx("div",{className:s(o.placeholder),children:t.jsx("select",{"data-testid":"addr-auto-locate-slct",className:s(o.input),"aria-label":l("Auto locate mode"),value:u,onChange:m,children:L.map(e=>t.jsx("option",{value:e.value,children:e.label},e.value))})})})}export{H as default};
