import { __assign } from "tslib";
import * as React from 'react';
import { StyleSheet, View } from 'react-native';
import { ToggleButton } from '@fluentui/react-native';
import { Checkbox } from '@fluentui/react-native';
import { commonTestStyles, testContentRootViewStyle } from '../Common/styles';
var styles = StyleSheet.create({
    row: {
        flexDirection: 'row',
    },
    checkbox: __assign(__assign({}, commonTestStyles.vmargin), { marginHorizontal: 8 }),
});
export var ToggleButtonTest = function () {
    var _a = React.useState(false), defaultChecked = _a[0], setDefaultChecked = _a[1];
    var onDefaultClicked = React.useCallback(function () { return setDefaultChecked(!defaultChecked); }, [defaultChecked, setDefaultChecked]);
    var _b = React.useState(false), subtleChecked = _b[0], setSubtleChecked = _b[1];
    var onGhostClicked = React.useCallback(function () { return setSubtleChecked(!subtleChecked); }, [subtleChecked, setSubtleChecked]);
    return (React.createElement(View, { style: testContentRootViewStyle },
        React.createElement(View, { style: styles.row },
            React.createElement(ToggleButton, { onClick: onDefaultClicked, checked: defaultChecked, style: commonTestStyles.vmargin }, "Default Toggle"),
            React.createElement(Checkbox, { checked: defaultChecked, label: "Default Toggle is Checked", style: styles.checkbox })),
        React.createElement(ToggleButton, { checked: true, style: commonTestStyles.vmargin }, "Checked Default Toggle"),
        React.createElement(ToggleButton, { checked: false, style: commonTestStyles.vmargin }, "Unchecked Default Toggle"),
        React.createElement(ToggleButton, { appearance: "primary", defaultChecked: true, style: commonTestStyles.vmargin }, "Checked Primary Toggle"),
        React.createElement(ToggleButton, { disabled: true, defaultChecked: true, appearance: "primary", style: commonTestStyles.vmargin }, "Checked Primary Toggle Disabled"),
        React.createElement(ToggleButton, { appearance: "primary", style: commonTestStyles.vmargin }, "Unchecked Primary Toggle"),
        React.createElement(View, { style: styles.row },
            React.createElement(ToggleButton, { appearance: "subtle", onClick: onGhostClicked, checked: subtleChecked, style: commonTestStyles.vmargin }, "Subtle Toggle"),
            React.createElement(Checkbox, { checked: subtleChecked, label: "Subtle Toggle is Checked", style: styles.checkbox })),
        React.createElement(ToggleButton, { appearance: "subtle", checked: true, style: commonTestStyles.vmargin }, "Checked Subtle Toggle"),
        React.createElement(ToggleButton, { appearance: "subtle", checked: false, style: commonTestStyles.vmargin }, "Unchecked Subtle Toggle")));
};
//# sourceMappingURL=ToggleButtonTestSection.js.map