import _defineProperty from "@babel/runtime/helpers/defineProperty";
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
import "core-js/modules/es.array.map.js";
import "core-js/modules/es.symbol.js";
import "core-js/modules/es.array.filter.js";
import "core-js/modules/es.array.for-each.js";
import "core-js/modules/es.array.push.js";
import "core-js/modules/es.object.define-properties.js";
import "core-js/modules/es.object.define-property.js";
import "core-js/modules/es.object.get-own-property-descriptor.js";
import "core-js/modules/es.object.get-own-property-descriptors.js";
import "core-js/modules/es.object.keys.js";
import "core-js/modules/es.object.to-string.js";
import "core-js/modules/esnext.iterator.constructor.js";
import "core-js/modules/esnext.iterator.filter.js";
import "core-js/modules/esnext.iterator.for-each.js";
import "core-js/modules/esnext.iterator.map.js";
import "core-js/modules/web.dom-collections.for-each.js";
import { FcrButton } from '../button';
import { FcrTabs } from '../tabs';
import { FcrCard } from '../card';
import './index.css';
import { ShareAudio } from '../room-screen-share-state-bar/share-audio';
import { ShareScreenContentHint } from '../room-screen-share-state-bar/share-screen-content-hint';
import FcrDivider from '../divider';
import { useI18n } from '../../i18n';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { createElement as _createElement } from "react";
var ShareSelectionWindowType = /*#__PURE__*/function (ShareSelectionWindowType) {
  ShareSelectionWindowType["BASIC"] = "basic";
  ShareSelectionWindowType["ADVANCED"] = "advanced";
  return ShareSelectionWindowType;
}(ShareSelectionWindowType || {});
export var ShareSelectionWindow = function ShareSelectionWindow(props) {
  var screens = props.screens,
    _props$applications = props.applications,
    applications = _props$applications === void 0 ? [] : _props$applications;
  var t = useI18n();
  return /*#__PURE__*/_jsxs("div", {
    className: "share-selection-window",
    children: [/*#__PURE__*/_jsx("div", {
      className: "share-selection-window__header  fcr-flex-center",
      children: /*#__PURE__*/_jsx(FcrTabs, {
        items: [{
          label: t('fmt_setting_option_basics'),
          key: ShareSelectionWindowType.BASIC
        }, {
          label: t('fmt_internalsetting_label_senior'),
          key: ShareSelectionWindowType.ADVANCED
        }],
        activeKey: ShareSelectionWindowType.BASIC,
        onChange: function onChange(key) {
          // throw new Error('Function not implemented.');
        }
      })
    }), /*#__PURE__*/_jsxs("div", {
      className: "share-selection-window__share-content frc-flex",
      children: [/*#__PURE__*/_jsx("div", {
        className: "share-selection-window__share-windows share-selection-window__share-card",
        children: screens.map(function (screen) {
          return /*#__PURE__*/_jsx(FcrCard, _objectSpread({}, screen));
        })
      }), applications.length && /*#__PURE__*/_jsxs("div", {
        className: "frc-flex share-selection-window__share-application",
        children: [/*#__PURE__*/_jsx("div", {
          style: {
            marginTop: '38px'
          },
          children: t('fmt_screenshare_label_application')
        }), /*#__PURE__*/_jsx(FcrDivider, {
          type: "horizontal",
          style: {
            margin: '8px 0px 12px 0'
          }
        }), /*#__PURE__*/_jsx("div", {
          className: " share-selection-window__share-card",
          children: applications.map(function (application) {
            return /*#__PURE__*/_createElement(FcrCard, _objectSpread(_objectSpread({}, application), {}, {
              key: "application-".concat(application.key)
            }));
          })
        })]
      })]
    }), /*#__PURE__*/_jsxs("div", {
      className: "share-selection-window__footer",
      children: [/*#__PURE__*/_jsxs("div", {
        className: "share-selection-window__footer-action",
        children: [/*#__PURE__*/_jsx(ShareAudio, _objectSpread({}, props)), /*#__PURE__*/_jsx(ShareScreenContentHint, _objectSpread({}, props))]
      }), /*#__PURE__*/_jsx(FcrButton, {
        type: "primary",
        shape: "rounded",
        size: "XS",
        children: /*#__PURE__*/_jsx("span", {
          className: "share-selection-window__footer-start-share-txt",
          children: t('fmt_screenshare_window_button_start')
        })
      })]
    })]
  });
};