import { useHost } from "@saasquatch/component-boilerplate";
import { useDomContextState } from "@saasquatch/dom-context-hooks";
export const LEAD_FORM_STATE_CONTEXT = "sq:lead-form-state";
const LEAD_FORM_STATE_CONTEXT_INTERNAL = "sq:lead-form-state-internal";
export function useLeadFormState(formState) {
  const host = useHost();
  const [leadFormState, setLeadFormState] = useDomContextState(host, LEAD_FORM_STATE_CONTEXT, formState);
  useDomContextState(host, LEAD_FORM_STATE_CONTEXT_INTERNAL, [leadFormState, setLeadFormState]);
  return { leadFormState, setLeadFormState };
}
