39 lines
1.5 KiB
TypeScript
39 lines
1.5 KiB
TypeScript
import { createTelephonyInterimFixtureViewModels } from "@hivegrid/ui-mock";
|
|
|
|
import { ClickToCallDialog } from "./ClickToCallDialog";
|
|
import { TelephonyCallDetailPage } from "./TelephonyCallDetailPage";
|
|
import { TelephonyCallsPage } from "./TelephonyCallsPage";
|
|
import { TelephonySettingsPage } from "./TelephonySettingsPage";
|
|
|
|
export const TELEPHONY_INTERIM_VISUAL_SCREENS = ["settings", "calls", "call-detail", "click-to-call"] as const;
|
|
|
|
export type TelephonyInterimVisualScreen = (typeof TELEPHONY_INTERIM_VISUAL_SCREENS)[number];
|
|
|
|
const noOp = (): void => undefined;
|
|
|
|
/** Shared AD-28 fixture for markup snapshots and Chromium pixel baselines. */
|
|
export function TelephonyInterimVisualFixture({ screen }: { readonly screen: TelephonyInterimVisualScreen }): React.JSX.Element {
|
|
const vm = createTelephonyInterimFixtureViewModels();
|
|
|
|
switch (screen) {
|
|
case "settings":
|
|
return (
|
|
<TelephonySettingsPage
|
|
vm={vm.settings}
|
|
actions={{ onConnect: noOp, onHealthCheck: noOp, onBindingChange: noOp, onDisconnect: noOp }}
|
|
/>
|
|
);
|
|
case "calls":
|
|
return <TelephonyCallsPage vm={vm.calls} actions={{ onOpenCall: noOp, onRefresh: noOp }} />;
|
|
case "call-detail":
|
|
return (
|
|
<TelephonyCallDetailPage
|
|
vm={vm.callDetail}
|
|
actions={{ onBack: noOp, onOverrideMatch: noOp, onSaveNote: noOp, onCallBack: noOp }}
|
|
/>
|
|
);
|
|
case "click-to-call":
|
|
return <ClickToCallDialog open vm={vm.clickToCall} actions={{ onOpenChange: noOp, onCall: noOp }} />;
|
|
}
|
|
}
|