"use strict";

require("core-js/modules/es.symbol.js");
require("core-js/modules/es.array.filter.js");
require("core-js/modules/es.array.for-each.js");
require("core-js/modules/es.array.push.js");
require("core-js/modules/es.object.define-properties.js");
require("core-js/modules/es.object.define-property.js");
require("core-js/modules/es.object.get-own-property-descriptor.js");
require("core-js/modules/es.object.get-own-property-descriptors.js");
require("core-js/modules/es.object.keys.js");
require("core-js/modules/esnext.iterator.filter.js");
require("core-js/modules/esnext.iterator.for-each.js");
require("core-js/modules/web.dom-collections.for-each.js");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.ShareSelectionWindow = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
require("core-js/modules/es.array.map.js");
require("core-js/modules/es.object.to-string.js");
require("core-js/modules/esnext.iterator.constructor.js");
require("core-js/modules/esnext.iterator.map.js");
var _button = require("../button");
var _tabs = require("../tabs");
var _card = require("../card");
require("./index.css");
var _shareAudio = require("../room-screen-share-state-bar/share-audio");
var _shareScreenContentHint = require("../room-screen-share-state-bar/share-screen-content-hint");
var _divider = _interopRequireDefault(require("../divider"));
var _i18n = require("../../i18n");
var _jsxRuntime = require("react/jsx-runtime");
var _react = require("react");
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) { (0, _defineProperty2["default"])(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; }
var ShareSelectionWindowType = /*#__PURE__*/function (ShareSelectionWindowType) {
  ShareSelectionWindowType["BASIC"] = "basic";
  ShareSelectionWindowType["ADVANCED"] = "advanced";
  return ShareSelectionWindowType;
}(ShareSelectionWindowType || {});
var ShareSelectionWindow = exports.ShareSelectionWindow = function ShareSelectionWindow(props) {
  var screens = props.screens,
    _props$applications = props.applications,
    applications = _props$applications === void 0 ? [] : _props$applications;
  var t = (0, _i18n.useI18n)();
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
    className: "share-selection-window",
    children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
      className: "share-selection-window__header  fcr-flex-center",
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_tabs.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__*/(0, _jsxRuntime.jsxs)("div", {
      className: "share-selection-window__share-content frc-flex",
      children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
        className: "share-selection-window__share-windows share-selection-window__share-card",
        children: screens.map(function (screen) {
          return /*#__PURE__*/(0, _jsxRuntime.jsx)(_card.FcrCard, _objectSpread({}, screen));
        })
      }), applications.length && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
        className: "frc-flex share-selection-window__share-application",
        children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
          style: {
            marginTop: '38px'
          },
          children: t('fmt_screenshare_label_application')
        }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_divider["default"], {
          type: "horizontal",
          style: {
            margin: '8px 0px 12px 0'
          }
        }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
          className: " share-selection-window__share-card",
          children: applications.map(function (application) {
            return /*#__PURE__*/(0, _react.createElement)(_card.FcrCard, _objectSpread(_objectSpread({}, application), {}, {
              key: "application-".concat(application.key)
            }));
          })
        })]
      })]
    }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
      className: "share-selection-window__footer",
      children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
        className: "share-selection-window__footer-action",
        children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_shareAudio.ShareAudio, _objectSpread({}, props)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_shareScreenContentHint.ShareScreenContentHint, _objectSpread({}, props))]
      }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.FcrButton, {
        type: "primary",
        shape: "rounded",
        size: "XS",
        children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
          className: "share-selection-window__footer-start-share-txt",
          children: t('fmt_screenshare_window_button_start')
        })
      })]
    })]
  });
};