import { palette } from '@roleypoly/design-system/atoms/colors'; import { FaderOpacity } from '@roleypoly/design-system/atoms/fader'; import { TextInput } from '@roleypoly/design-system/atoms/text-input'; import { AmbientLarge, Text } from '@roleypoly/design-system/atoms/typography'; import { MessageBox } from '@roleypoly/design-system/organisms/role-picker/RolePicker.styled'; import { GuildData, WebhookValidationStatus } from '@roleypoly/types'; import { GoAlert, GoInfo } from 'react-icons/go'; import ReactTooltip from 'react-tooltip'; import styled from 'styled-components'; type Props = { onChange: (guildData: GuildData) => void; guildData: GuildData; validationStatus: WebhookValidationStatus | null; }; export const ServerUtilities = (props: Props) => { return ( (optional) Webhook URL for Audit Logging{' '} props.onChange({ ...props.guildData, auditLogWebhook: event.target.value }) } /> ); }; const ValidationStatus = (props: Pick) => { switch (props.validationStatus) { case WebhookValidationStatus.NotDiscordURL: return ( URL must be to a Discord webhook, starting with "https://discord.com/api/webhooks/". ); case WebhookValidationStatus.NotSameGuild: return ( Webhook must be in the same guild you are currently editing. ); case WebhookValidationStatus.DoesNotExist: return ( This webhook doesn't exist. ); default: return  ; } }; const Alert = styled(GoAlert)` color: ${palette.red400}; position: relative; top: 2px; `;