'use client'; import * as React from 'react'; import type { CheckboxRootState } from './CheckboxRoot'; export type CheckboxRootContext = CheckboxRootState; export const CheckboxRootContext = React.createContext(undefined); export function useCheckboxRootContext() { const context = React.useContext(CheckboxRootContext); if (context === undefined) { throw new Error( 'Zest: CheckboxRootContext is missing. Checkbox parts must be placed within .', ); } return context; }