import { View } from 'react-native';
import { useStyles } from './styles';
import { Radio } from '../../../../../../core/components/Radio';
import { ElementID, PageID } from '../../../../../enums';
import FormLabel from '../../../../../elements/FormLabel';
import { AmityCommunityPrivacyEnum } from '../../types';
import { public as $public, private as $private } from '../../../../../../core/assets/icons';
import { Title } from '../../../../../elements';
import FormDescription from '../../../../../elements/FormDescription';
import CommunityPrivacyIcon from '../../../../../elements/CommunityPrivacyIcon';
function Privacy({
  value,
  onChange
}) {
  const {
    styles
  } = useStyles();
  return /*#__PURE__*/React.createElement(View, {
    style: [styles.container, value === AmityCommunityPrivacyEnum.PRIVATE && styles.containerBorder]
  }, /*#__PURE__*/React.createElement(FormLabel, {
    pageId: PageID.community_setup_page,
    elementId: ElementID.community_privacy_title
  }), /*#__PURE__*/React.createElement(Radio.Group, {
    value: value,
    onChange: onChange
  }, /*#__PURE__*/React.createElement(Radio.Option, {
    style: () => styles.optionContainer,
    value: AmityCommunityPrivacyEnum.PUBLIC,
    accessibilityLabel: AmityCommunityPrivacyEnum.PUBLIC
  }, /*#__PURE__*/React.createElement(Radio.Label, {
    style: styles.labelContainer
  }, /*#__PURE__*/React.createElement(CommunityPrivacyIcon, {
    iconProps: {
      xml: $public()
    },
    pageId: PageID.community_setup_page,
    elementId: ElementID.community_privacy_public_icon
  }), /*#__PURE__*/React.createElement(View, {
    style: styles.infoContainer
  }, /*#__PURE__*/React.createElement(Title, {
    variant: "body",
    style: styles.title,
    pageId: PageID.community_setup_page,
    elementId: ElementID.community_privacy_public_title
  }), /*#__PURE__*/React.createElement(FormDescription, {
    style: styles.description,
    pageId: PageID.community_setup_page,
    elementId: ElementID.community_privacy_public_description
  }))), /*#__PURE__*/React.createElement(Radio.Icon, null)), /*#__PURE__*/React.createElement(Radio.Option, {
    style: () => styles.optionContainer,
    value: AmityCommunityPrivacyEnum.PRIVATE,
    accessibilityLabel: AmityCommunityPrivacyEnum.PRIVATE
  }, /*#__PURE__*/React.createElement(Radio.Label, {
    style: styles.labelContainer
  }, /*#__PURE__*/React.createElement(CommunityPrivacyIcon, {
    iconProps: {
      xml: $private()
    },
    pageId: PageID.community_setup_page,
    elementId: ElementID.community_privacy_private_icon
  }), /*#__PURE__*/React.createElement(View, {
    style: styles.infoContainer
  }, /*#__PURE__*/React.createElement(Title, {
    variant: "body",
    style: styles.title,
    pageId: PageID.community_setup_page,
    elementId: ElementID.community_privacy_private_title
  }), /*#__PURE__*/React.createElement(FormDescription, {
    style: styles.description,
    pageId: PageID.community_setup_page,
    elementId: ElementID.community_privacy_private_description
  }))), /*#__PURE__*/React.createElement(Radio.Icon, null))));
}
export default Privacy;
//# sourceMappingURL=index.js.map