"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _reactNative = require("react-native");
var _styles = require("./styles");
var _Radio = require("../../../../../../core/components/Radio");
var _enums = require("../../../../../enums");
var _FormLabel = _interopRequireDefault(require("../../../../../elements/FormLabel"));
var _types = require("../../types");
var _icons = require("../../../../../../core/assets/icons");
var _elements = require("../../../../../elements");
var _FormDescription = _interopRequireDefault(require("../../../../../elements/FormDescription"));
var _CommunityPrivacyIcon = _interopRequireDefault(require("../../../../../elements/CommunityPrivacyIcon"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function Privacy({
  value,
  onChange
}) {
  const {
    styles
  } = (0, _styles.useStyles)();
  return /*#__PURE__*/React.createElement(_reactNative.View, {
    style: [styles.container, value === _types.AmityCommunityPrivacyEnum.PRIVATE && styles.containerBorder]
  }, /*#__PURE__*/React.createElement(_FormLabel.default, {
    pageId: _enums.PageID.community_setup_page,
    elementId: _enums.ElementID.community_privacy_title
  }), /*#__PURE__*/React.createElement(_Radio.Radio.Group, {
    value: value,
    onChange: onChange
  }, /*#__PURE__*/React.createElement(_Radio.Radio.Option, {
    style: () => styles.optionContainer,
    value: _types.AmityCommunityPrivacyEnum.PUBLIC,
    accessibilityLabel: _types.AmityCommunityPrivacyEnum.PUBLIC
  }, /*#__PURE__*/React.createElement(_Radio.Radio.Label, {
    style: styles.labelContainer
  }, /*#__PURE__*/React.createElement(_CommunityPrivacyIcon.default, {
    iconProps: {
      xml: (0, _icons.public)()
    },
    pageId: _enums.PageID.community_setup_page,
    elementId: _enums.ElementID.community_privacy_public_icon
  }), /*#__PURE__*/React.createElement(_reactNative.View, {
    style: styles.infoContainer
  }, /*#__PURE__*/React.createElement(_elements.Title, {
    variant: "body",
    style: styles.title,
    pageId: _enums.PageID.community_setup_page,
    elementId: _enums.ElementID.community_privacy_public_title
  }), /*#__PURE__*/React.createElement(_FormDescription.default, {
    style: styles.description,
    pageId: _enums.PageID.community_setup_page,
    elementId: _enums.ElementID.community_privacy_public_description
  }))), /*#__PURE__*/React.createElement(_Radio.Radio.Icon, null)), /*#__PURE__*/React.createElement(_Radio.Radio.Option, {
    style: () => styles.optionContainer,
    value: _types.AmityCommunityPrivacyEnum.PRIVATE,
    accessibilityLabel: _types.AmityCommunityPrivacyEnum.PRIVATE
  }, /*#__PURE__*/React.createElement(_Radio.Radio.Label, {
    style: styles.labelContainer
  }, /*#__PURE__*/React.createElement(_CommunityPrivacyIcon.default, {
    iconProps: {
      xml: (0, _icons.private)()
    },
    pageId: _enums.PageID.community_setup_page,
    elementId: _enums.ElementID.community_privacy_private_icon
  }), /*#__PURE__*/React.createElement(_reactNative.View, {
    style: styles.infoContainer
  }, /*#__PURE__*/React.createElement(_elements.Title, {
    variant: "body",
    style: styles.title,
    pageId: _enums.PageID.community_setup_page,
    elementId: _enums.ElementID.community_privacy_private_title
  }), /*#__PURE__*/React.createElement(_FormDescription.default, {
    style: styles.description,
    pageId: _enums.PageID.community_setup_page,
    elementId: _enums.ElementID.community_privacy_private_description
  }))), /*#__PURE__*/React.createElement(_Radio.Radio.Icon, null))));
}
var _default = exports.default = Privacy;
//# sourceMappingURL=index.js.map