import{I as e,J as t,S as n,T as r,n as i,r as a,t as o}from"./folders.j8Vf02Wn.js";import{c as s}from"./style.BtGWTIRi.js";var c={class:`settings-view p-4`},l={class:`space-y-6 max-w-2xl`},u={class:`space-y-3`},d={class:`flex items-center justify-between`},f=[`checked`],p={class:`flex items-center justify-between`},m=[`checked`],h={class:`flex items-center justify-between`},g=[`checked`],_={class:`flex items-center justify-between`},v=[`checked`],y={class:`space-y-3`},b={class:`flex items-center justify-between`},x=[`checked`],S={__name:`SettingsView`,setup(S){let C=s(),w=i(),T=o(),E=a();async function D(){let e=await C.exportAll(),t=new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`silo-export-${new Date().toISOString().slice(0,10)}.json`,r.click(),URL.revokeObjectURL(n)}async function O(){confirm(`This will delete ALL your links, folders, tags, and settings. This cannot be undone.`)&&(await Promise.all([w.reset(),T.reset(),E.reset(),C.reset()]),alert(`All data has been reset.`))}return(i,a)=>(e(),r(`div`,c,[a[13]||=n(`h2`,{class:`text-lg font-medium text-foreground mb-4`},`Settings`,-1),n(`div`,l,[n(`div`,null,[a[9]||=n(`h3`,{class:`text-sm font-medium text-foreground mb-3`},`Appearance`,-1),n(`div`,u,[n(`label`,d,[a[5]||=n(`span`,{class:`text-sm text-foreground`},`Show favicons`,-1),n(`input`,{type:`checkbox`,checked:t(C).settings.showFavicons,onChange:a[0]||=e=>t(C).update(`showFavicons`,e.target.checked),class:`h-4 w-4 cursor-pointer`},null,40,f)]),n(`label`,p,[a[6]||=n(`span`,{class:`text-sm text-foreground`},`Auto-parse query parameters`,-1),n(`input`,{type:`checkbox`,checked:t(C).settings.autoParseQuery,onChange:a[1]||=e=>t(C).update(`autoParseQuery`,e.target.checked),class:`h-4 w-4 cursor-pointer`},null,40,m)]),n(`label`,h,[a[7]||=n(`span`,{class:`text-sm text-foreground`},`Strip tracking params (utm_*, fbclid, etc.)`,-1),n(`input`,{type:`checkbox`,checked:t(C).settings.stripTrackingParams,onChange:a[2]||=e=>t(C).update(`stripTrackingParams`,e.target.checked),class:`h-4 w-4 cursor-pointer`},null,40,g)]),n(`label`,_,[a[8]||=n(`span`,{class:`text-sm text-foreground`},`Show thumbnails for products`,-1),n(`input`,{type:`checkbox`,checked:t(C).settings.showThumbnails,onChange:a[3]||=e=>t(C).update(`showThumbnails`,e.target.checked),class:`h-4 w-4 cursor-pointer`},null,40,v)])])]),n(`div`,null,[a[11]||=n(`h3`,{class:`text-sm font-medium text-foreground mb-3`},`Data`,-1),n(`div`,y,[n(`button`,{onClick:D,class:`btn btn-secondary btn-sm`},` Export Data (JSON) `),n(`label`,b,[a[10]||=n(`span`,{class:`text-sm text-foreground`},`Confirm before bulk delete`,-1),n(`input`,{type:`checkbox`,checked:t(C).settings.confirmBeforeDelete,onChange:a[4]||=e=>t(C).update(`confirmBeforeDelete`,e.target.checked),class:`h-4 w-4 cursor-pointer`},null,40,x)])])]),n(`div`,null,[a[12]||=n(`h3`,{class:`text-sm font-medium text-red-500 mb-3`},`Danger Zone`,-1),n(`button`,{onClick:O,class:`btn btn-sm bg-red-100 text-red-900 hover:bg-red-200`},` Reset All Data `)])])]))}};export{S as default};