import { useAtomValue } from 'jotai';
import { operationStore } from '../../jotai/operation.js';
export function useExampleKey({ pointer } = {}, examples) {
    const operationState = useAtomValue(operationStore(pointer));
    const { activeExampleName } = operationState;
    return {
        exampleKey: activeExampleName && examples[activeExampleName]
            ? activeExampleName
            : Object.keys(examples)[0],
    };
}
//# sourceMappingURL=use-example-key.js.map