import { Box, Input, Tooltip } from '@wix/design-system';
import { FlagSmall, StatusAlertSmall } from '@wix/wix-ui-icons-common';
import React from 'react';
import { observer } from 'mobx-react-lite';
export function _ViewsDropdownPrefix(props) {
    const { state } = props;
    const { views } = state;
    const { collection: { translate: t }, } = views;
    if (!views.isCurrentViewSelected ||
        (views.isCurrentViewSelected && state.isViewChanged)) {
        return (React.createElement(Input.Affix, null,
            React.createElement(Box, { dataHook: "view-pending-changes" },
                React.createElement(Tooltip, { appendTo: "window", content: views.isCurrentViewSelected
                        ? t('cairo.manageView.tooltip')
                        : t('cairo.manageView.unsaved.tooltip') },
                    React.createElement(Box, { verticalAlign: "middle", color: "D40" },
                        React.createElement(StatusAlertSmall, null))))));
    }
    if (views.isDefaultView) {
        return (React.createElement(Input.Affix, null,
            React.createElement(Box, { dataHook: "view-default" },
                React.createElement(FlagSmall, null))));
    }
    return null;
}
export const ViewsDropdownPrefix = observer(_ViewsDropdownPrefix);
//# sourceMappingURL=ViewsDropdownPrefix.js.map