import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { ChevronDownIcon } from '../../../lib/icons/ChevronDown.js';
import { FanIcon } from '../../../lib/icons/Fan.js';
import { FanOutlineIcon } from '../../../lib/icons/FanOutline.js';
import { Menu } from '../../../lib/ui/Menu/Menu.js';
import { ThermoModeMenuOption } from '../../../lib/ui/thermostat/ThermoModeMenuOption.js';
const modes = ['auto', 'on'];
export function FanModeMenu({ mode, onChange }) {
    return (_jsx(Menu, { renderButton: ({ onOpen }) => (_jsxs("button", { onClick: onOpen, className: 'seam-fan-mode-menu-button', children: [_jsxs("div", { className: 'seam-fan-mode-menu-button-block', children: [_jsx(FanOutlineIcon, {}), _jsx("span", { className: 'seam-fan-mode-menu-button-text', children: mode === 'auto' ? t.auto : t.on })] }), _jsx(ChevronDownIcon, {})] })), verticalOffset: -180, horizontalOffset: -32, backgroundProps: {
            className: 'seam-thermo-mode-menu',
        }, children: modes.map((m) => (_jsx(ThermoModeMenuOption, { label: t[m], icon: _jsx(FanIcon, {}), isSelected: mode === m, onClick: () => {
                onChange(m);
            } }, m))) }));
}
const t = {
    auto: 'Auto',
    on: 'On',
};
//# sourceMappingURL=FanModeMenu.js.map