import { CheckboxUniDriver } from '@wix/design-system/dist/testkit/unidriver';
import { baseUniDriverFactory } from '../../../../unidriver';
export function BooleanEditUniDriver(base, body) {
    const checkbox = CheckboxUniDriver(base.$('[data-hook="boolean-checkbox"]'), body);
    return {
        ...baseUniDriverFactory(base),
        isChecked: () => checkbox.isChecked(),
        toggle: () => checkbox.click(),
        /** Native dispatch — Checkbox uni.driver has no keyDown */
        keyDown: async (key, opts) => {
            const input = await base.$('input').getNative();
            input.dispatchEvent(new KeyboardEvent('keydown', { key, bubbles: true, ...opts }));
        },
    };
}
//# sourceMappingURL=Edit.uni.driver.js.map