import { a as state, e as clearCheckout$1 } from './watchers.js';

/**
 * Clear the current checkout.
 */
const clearCheckout = () => clearCheckout$1(state.formId, state.mode);
/**
 * Lock the checkout (disables input and submission)
 * Pass a lock name to prevent conflicts and allow multiple locks.
 */
const lockCheckout = lockName => (state.locks = [...state.locks, lockName]);
/**
 * Unlock the checkout.
 * Pass an optional lock name to only unlock a specific lock
 */
const unLockCheckout = (lockName = '') => (state.locks = !!lockName ? state.locks.filter(name => name !== lockName) : []);

export { clearCheckout as c, lockCheckout as l, unLockCheckout as u };
