import { useI18n } from '../../../i18n';
import { FcrCheckbox } from '../../checkbox';
import { FcrDropMenu } from '../../drop-menu';
import { FcrIconType } from '../../icon/type';
import { FcrToolTip } from '../../tooltip';
import { ActionBarItemWithPopover } from '../item';
import { jsx as _jsx } from "react/jsx-runtime";
export var Security = function Security(_ref) {
  var id = _ref.id,
    order = _ref.order;
  var t = useI18n();
  var title = t('fmt_screenshare_controlbar_button_security');
  var tooltip = t('fmt_screenshare_controlbar_button_security');
  var SecurityOptions = function SecurityOptions() {
    var allActions = [{
      title: /*#__PURE__*/_jsx(FcrCheckbox, {
        checked: false,
        label: t('fmt_screenshare_controlbar_security_list_lock'),
        styleType: "white"
      }),
      key: 'lock_room',
      type: 'primary',
      onButtonClick: function onButtonClick() {}
    }, {
      title: /*#__PURE__*/_jsx(FcrCheckbox, {
        checked: false,
        label: t('fmt_security_options_activatewaitingroom'),
        styleType: "white"
      }),
      key: 'enable_waiting_room',
      type: 'disabled',
      onButtonClick: function onButtonClick() {},
      classNames: 'room-control-drop-with-under-line'
    }, {
      title: t('fmt_screenshare_options_allow'),
      key: 'allow_attendee_title',
      type: 'title'
    }, {
      title: /*#__PURE__*/_jsx(FcrCheckbox, {
        checked: false,
        label: t('fmt_screenshare_controlbar_security_list_participant_unmute'),
        styleType: "white"
      }),
      key: 'unmute_yourself',
      type: 'primary',
      onButtonClick: function onButtonClick() {}
    }, {
      title: /*#__PURE__*/_jsx(FcrCheckbox, {
        checked: false,
        label: t('fmt_screenshare_controlbar_security_list_participant_changeName'),
        styleType: "white"
      }),
      key: 'rename',
      type: 'disabled',
      onButtonClick: function onButtonClick() {}
    }, {
      title: /*#__PURE__*/_jsx(FcrCheckbox, {
        checked: false,
        label: t('fmt_security_start_video'),
        styleType: "white"
      }),
      key: 'start_video',
      type: 'primary',
      onButtonClick: function onButtonClick() {},
      classNames: 'room-control-drop-with-under-line'
    }];
    return /*#__PURE__*/_jsx(FcrDropMenu, {
      options: allActions
    });
  };
  return /*#__PURE__*/_jsx(FcrToolTip, {
    content: tooltip,
    children: /*#__PURE__*/_jsx(ActionBarItemWithPopover, {
      popoverProps: {
        content: /*#__PURE__*/_jsx(SecurityOptions, {}),
        overlayClassName: 'attendee__footer-more-actions',
        overlayInnerStyle: {
          boxShadow: 'none',
          border: 'none',
          minWidth: '256px',
          width: 'auto',
          maxWidth: '300px'
        }
      },
      id: id,
      order: order,
      onClick: function onClick() {},
      icon: FcrIconType.FCR_SECURITY,
      title: title,
      iconColors: {
        iconPrimary: 'var(--fcr_web_ui_scene_mainicon1)'
      }
    })
  });
};