/*
* Copyright (C) 2026 Fluxer Contributors
*
* This file is part of Fluxer.
*
* Fluxer is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Fluxer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Fluxer. If not, see .
*/
/** @jsxRuntime automatic */
/** @jsxImportSource hono/jsx */
import {Icon} from '@fluxer/marketing/src/components/icons/IconRegistry';
import {MarketingButton} from '@fluxer/marketing/src/components/MarketingButton';
import {MarketingCard} from '@fluxer/marketing/src/components/MarketingCard';
import type {MarketingContext} from '@fluxer/marketing/src/MarketingContext';
type SupportIcon =
| 'rocket_launch'
| 'fluxer_partner'
| 'chat_centered_text'
| 'bluesky'
| 'bug'
| 'code'
| 'translate'
| 'shield_check';
interface SupportCardProps {
ctx: MarketingContext;
icon: SupportIcon;
title: string;
description: string;
buttonText: string;
buttonHref: string;
theme?: 'light' | 'dark';
}
export function SupportCard(props: SupportCardProps): JSX.Element {
const linkProps = getLinkProps(props.buttonHref);
const theme = props.theme ?? 'light';
return (
{props.title}
{props.description}
{props.buttonText}
);
}
function getLinkProps(href: string): {target?: '_blank' | '_self' | '_parent' | '_top'; rel?: string} {
if (href.startsWith('https://') || href.startsWith('http://') || href.startsWith('mailto:')) {
return {target: '_blank', rel: 'noopener noreferrer'};
}
return {};
}