import { observer } from 'mobx-react-lite';
import React from 'react';
import { SegmentedToggle } from '@wix/design-system';
import { LayoutGallery, LayoutList } from '@wix/wix-ui-icons-common';
import { useWixPatternsContainer } from '@wix/bex-core/react';
function _TableGridSwitchButton(props) {
    const { translate: t } = useWixPatternsContainer();
    const { state } = props;
    const { viewType } = state;
    return (React.createElement(SegmentedToggle, { size: "small", dataHook: "table-grid-switch-toggle-button", selected: viewType, onClick: (_, value) => {
            if (state.viewType === value) {
                return;
            }
            state.changeViewType(value);
        } },
        React.createElement(SegmentedToggle.Icon, { value: "grid", dataHook: "toggle-option-grid", tooltipText: t('cairo.table.gridView') },
            React.createElement(LayoutGallery, null)),
        React.createElement(SegmentedToggle.Icon, { value: "table", dataHook: "toggle-option-table", tooltipText: t('cairo.table.listView') },
            React.createElement(LayoutList, null))));
}
export const TableGridSwitchButton = observer(_TableGridSwitchButton);
//# sourceMappingURL=TableGridSwitchButton.js.map