import { ChevronRight } from 'lucide-react';
import type { ComponentType, ReactNode } from 'react';
import type { ProfileDashboardCardKey } from '../../../packages/shared/src/contracts/runtime';
import {
ICP_RECORD_NUMBER,
ICP_RECORD_URL,
LEGAL_DOCUMENTS,
type LegalDocumentId,
} from '../common/legalDocuments';
import { PlatformNavigableListItem } from '../common/PlatformNavigableListItem';
type ProfileStatCardProps = {
cardKey: ProfileDashboardCardKey;
label: string;
value: string;
onClick?: ((cardKey: ProfileDashboardCardKey) => void) | null;
icon: ComponentType<{ className?: string }>;
imageSrc?: string;
};
export function ProfileStatCard({
cardKey,
label,
value,
onClick,
icon,
imageSrc,
}: ProfileStatCardProps) {
const Icon = icon;
return (
);
}
export function ProfileStatCardSkeleton() {
return (
);
}
type ProfileShortcutButtonProps = {
label: string;
subLabel?: ReactNode;
icon: ComponentType<{ className?: string }>;
onClick?: (() => void) | null;
imageSrc?: string;
};
export function ProfileShortcutButton({
label,
subLabel,
icon,
onClick,
imageSrc,
}: ProfileShortcutButtonProps) {
const Icon = icon;
return (
);
}
type ProfileSettingsRowProps = {
label: string;
icon: ComponentType<{ className?: string }>;
onClick: () => void;
};
export function ProfileSettingsRow({
label,
icon,
onClick,
}: ProfileSettingsRowProps) {
const Icon = icon;
return (
}
bodyClassName="flex min-w-0 items-center"
trailing={
}
>
{label}
);
}
type ProfileLegalSectionProps = {
onOpenDocument: (documentId: LegalDocumentId) => void;
};
export function ProfileLegalSection({
onOpenDocument,
}: ProfileLegalSectionProps) {
return (
{LEGAL_DOCUMENTS.map((document, index) => (
))}
{ICP_RECORD_NUMBER}
);
}