import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{Ht as t}from"./vendor-react-N_fu9J_Y.js";import{p as n,t as r}from"./checkout-storage-C4Gtbqnl.js";var i=e(t()),a=(e,t=!1)=>{let[a,o]=n(r.CHECKOUT_ACCORDION_STATES,{}),s=a?.[e]??t;return{isOpen:!s,isCompleted:s,toggle:(0,i.useCallback)(()=>{o(n=>({...n||{},[e]:!(n?.[e]??t)}))},[e,t,o]),open:(0,i.useCallback)(()=>{o(t=>({...t||{},[e]:!1}))},[e,o]),close:(0,i.useCallback)(()=>{o(t=>({...t||{},[e]:!0}))},[e,o])}};export{a as t};