"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireWildcard(require("react"));
var _styledModalComponents = require("../styledModalComponents");
var _ModalHeaderComponent = _interopRequireDefault(require("../ModalHeaderComponent"));
var _Button = _interopRequireDefault(require("../../styled/Button"));
var _reactRedux = require("react-redux");
var _chatSettingsSlice = require("../../../roomStore/chatSettingsSlice");
var _MODAL_TYPES = require("../../../helpers/constants/MODAL_TYPES");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
const UserSettingsModal = ({
  handleCloseModal
}) => {
  const options = (0, _react.useMemo)(() => [{
    value: 'Manage Data',
    key: _MODAL_TYPES.MODAL_TYPES.MANAGE_DATA
  }, {
    value: 'Visiblility',
    key: _MODAL_TYPES.MODAL_TYPES.VISIBILITY
  }
  // { value: 'Profile Shares', key: MODAL_TYPES.PROFILE_SHARES },
  // { value: 'Document Shares', key: MODAL_TYPES.DOCUMENT_SHARES },
  // { value: 'Blocked Users', key: MODAL_TYPES.BLOCKED_USERS },
  // { value: 'Referrals', key: MODAL_TYPES.REFERRALS },
  ], []);
  const dispatch = (0, _reactRedux.useDispatch)();
  const handleClick = (0, _react.useCallback)(key => {
    dispatch((0, _chatSettingsSlice.setActiveModal)(key));
  }, []);
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styledModalComponents.ModalContainerFullScreen, {
    children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ModalHeaderComponent.default, {
      handleCloseModal: handleCloseModal,
      headerTitle: 'Settings'
    }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledModalComponents.CenterContainer, {
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledModalComponents.BorderedContainer, {
        style: {
          padding: 16,
          display: 'flex',
          flexDirection: 'column',
          gap: 8
        },
        children: options.map((option, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
          children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Button.default, {
            variant: "default",
            style: {
              minHeight: 40,
              display: 'flex',
              flexDirection: 'column',
              gap: 2,
              width: '100%',
              justifyContent: 'center',
              borderRadius: 0,
              alignItems: 'flex-start'
            },
            onPress: () => handleClick(option.key),
            children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styledModalComponents.Label, {
              style: {
                textAlign: 'center'
              },
              children: option.value
            }), [2, 3, 4].includes(index) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledModalComponents.LabelData, {
              children: "0"
            })]
          }), index < 5 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledModalComponents.Viewider, {})]
        }))
      })
    })]
  });
};
var _default = exports.default = UserSettingsModal;
//# sourceMappingURL=UserSettingsModal.js.map