import DiscordLogo from '@app/assets/extlogos/discord.svg';
import GotifyLogo from '@app/assets/extlogos/gotify.svg';
import LunaSeaLogo from '@app/assets/extlogos/lunasea.svg';
import NtfyLogo from '@app/assets/extlogos/ntfy.svg';
import PushbulletLogo from '@app/assets/extlogos/pushbullet.svg';
import PushoverLogo from '@app/assets/extlogos/pushover.svg';
import SlackLogo from '@app/assets/extlogos/slack.svg';
import TelegramLogo from '@app/assets/extlogos/telegram.svg';
import PageTitle from '@app/components/Common/PageTitle';
import type { SettingsRoute } from '@app/components/Common/SettingsTabs';
import SettingsTabs from '@app/components/Common/SettingsTabs';
import globalMessages from '@app/i18n/globalMessages';
import defineMessages from '@app/utils/defineMessages';
import { BoltIcon, CloudIcon, EnvelopeIcon } from '@heroicons/react/24/solid';
import { useIntl } from 'react-intl';
const messages = defineMessages('components.Settings', {
notifications: 'Notifications',
notificationsettings: 'Notification Settings',
notificationAgentSettingsDescription:
'Configure and enable notification agents.',
email: 'Email',
webhook: 'Webhook',
webpush: 'Web Push',
});
type SettingsNotificationsProps = {
children: React.ReactNode;
};
const SettingsNotifications = ({ children }: SettingsNotificationsProps) => {
const intl = useIntl();
const settingsRoutes: SettingsRoute[] = [
{
text: intl.formatMessage(messages.email),
content: (
{intl.formatMessage(messages.email)}
),
route: '/settings/notifications/email',
regex: /^\/settings\/notifications\/email/,
},
{
text: intl.formatMessage(messages.webpush),
content: (
{intl.formatMessage(messages.webpush)}
),
route: '/settings/notifications/webpush',
regex: /^\/settings\/notifications\/webpush/,
},
{
text: 'Discord',
content: (
Discord
),
route: '/settings/notifications/discord',
regex: /^\/settings\/notifications\/discord/,
},
{
text: 'Gotify',
content: (
Gotify
),
route: '/settings/notifications/gotify',
regex: /^\/settings\/notifications\/gotify/,
},
{
text: 'ntfy.sh',
content: (
ntfy.sh
),
route: '/settings/notifications/ntfy',
regex: /^\/settings\/notifications\/ntfy/,
},
{
text: 'LunaSea',
content: (
LunaSea
),
route: '/settings/notifications/lunasea',
regex: /^\/settings\/notifications\/lunasea/,
},
{
text: 'Pushbullet',
content: (
Pushbullet
),
route: '/settings/notifications/pushbullet',
regex: /^\/settings\/notifications\/pushbullet/,
},
{
text: 'Pushover',
content: (
Pushover
),
route: '/settings/notifications/pushover',
regex: /^\/settings\/notifications\/pushover/,
},
{
text: 'Slack',
content: (
Slack
),
route: '/settings/notifications/slack',
regex: /^\/settings\/notifications\/slack/,
},
{
text: 'Telegram',
content: (
Telegram
),
route: '/settings/notifications/telegram',
regex: /^\/settings\/notifications\/telegram/,
},
{
text: intl.formatMessage(messages.webhook),
content: (
{intl.formatMessage(messages.webhook)}
),
route: '/settings/notifications/webhook',
regex: /^\/settings\/notifications\/webhook/,
},
];
return (
<>
{intl.formatMessage(messages.notificationsettings)}
{intl.formatMessage(messages.notificationAgentSettingsDescription)}
{children}
>
);
};
export default SettingsNotifications;