import * as React from "react";
import { Link } from "react-router-dom";
import {
Button,
buttonSizes,
RegistryEmptyIcon,
StyledRegistryEmpty,
StyledEmptyHeader,
StyledEmptyCopy,
} from "@joincivil/components";
interface EmptyRegistryTabContent {
header: string;
copy: JSX.Element | string;
}
export enum REGISTRY_PHASE_TAB_TYPES {
APPROVED,
REJECTED,
IN_APPLICATION,
UNDER_CHALLENGE,
UNDER_APPEAL,
UNDER_APPEAL_CHALLENGE,
READY_TO_UPDATE,
}
const EMPTY_REGISTRY_TAB_CONTENT: { [index: number]: EmptyRegistryTabContent } = {
[REGISTRY_PHASE_TAB_TYPES.APPROVED]: {
header: "There are no approved newsrooms",
copy: (
<>
You can view new applications or{" "}
apply to join the Civil Registry
>
),
},
[REGISTRY_PHASE_TAB_TYPES.REJECTED]: {
header: "There are no rejected newsrooms",
copy: (
<>
You can view new applications or{" "}
apply to join the Civil Registry
>
),
},
[REGISTRY_PHASE_TAB_TYPES.IN_APPLICATION]: {
header: "There are no new applications at this time",
copy: (
<>
Join the community-approved ethical Newsrooms on Civil
>
),
},
[REGISTRY_PHASE_TAB_TYPES.UNDER_CHALLENGE]: {
header: "There are no newsrooms under challenge at this time",
copy: (
<>
You can view approved newsrooms or{" "}
apply to Registry
>
),
},
[REGISTRY_PHASE_TAB_TYPES.UNDER_APPEAL]: {
header: "There are no appeals to the Civil Council at this time",
copy: (
<>
You can view approved newsrooms or{" "}
apply to Registry
>
),
},
[REGISTRY_PHASE_TAB_TYPES.UNDER_APPEAL_CHALLENGE]: {
header: "There are no Civil Council decisions under challenge at this time",
copy: (
<>
You can view approved newsrooms or{" "}
apply to Registry
>
),
},
[REGISTRY_PHASE_TAB_TYPES.READY_TO_UPDATE]: {
header: "There are no newsrooms with statuses ready to update at this time",
copy: (
<>
You can view approved newsrooms or{" "}
apply to Registry
>
),
},
};
export interface EmptyRegistryTabContentProps {
phaseTabType: number;
}
export const EmptyRegistryTabContentComponent: React.FunctionComponent = props => {
const tabContent = EMPTY_REGISTRY_TAB_CONTENT[props.phaseTabType];
return (
{tabContent.header}{tabContent.copy}
);
};