import { CSSObject, FlattenSimpleInterpolation } from 'styled-components'; import { ReactNode } from 'react'; export type ApprovalCenterProps = { className?: string; $css?: string | CSSObject | FlattenSimpleInterpolation; preview?: ApprovalCenterPreview; tabs: ApprovalCenterTabs; lifeCycle?: LifeCycleItem[]; history?: HistoryItem[]; }; export type ApprovalCenterPreview = { button?: PreviewButton; loading?: boolean; }; export type ApprovalCenterTabs = { active: 'LIFE_CYCLE'; available: ['LIFE_CYCLE', 'HISTORY'] | ['HISTORY', 'LIFE_CYCLE'] | ['HISTORY'] | ['LIFE_CYCLE']; }; export type HistoryAction = { status: HistoryItem['status']; title: HistoryItem['actionTitle']; time: string; }; export type HistoryDay = { date: string; actions: HistoryAction[]; }; export type HistoryItem = { status: HistoryItemStatus; actionTitle: string; actionDate: string; }; export type HistoryProps = { historyByDay: HistoryDay[]; }; export type StageStatus = 'DEFAULT' | 'WAIT' | 'SUCCESSFUL' | 'FAILURE'; export type LifeCycleButton = { contentLeft: ReactNode; onClick: () => void; text: string; }; export type StageItem = { status: StageStatus; title: string; open?: boolean; comment?: string; tooltip?: { text: string; }; mark?: { tooltip: { text: string; }; icon: ReactNode; }; actionTitle?: string; actionDate?: string; assignee?: [string, ...string[]]; buttons?: LifeCycleButton[]; }; export type LifeCycleItem = { status: LifeCycleStatus; title: string; actionTitle?: string; actionDate?: string; stages?: StageItem[]; buttons?: LifeCycleButton[]; }; export type LifeCycleProps = { lifeCycle: LifeCycleItem[]; }; export type PreviewButton = { onClick: () => void; text: string; }; export type PreviewProps = { preview?: ApprovalCenterProps['preview']; }; export type HistoryItemStatus = 'DEFAULT' | 'WAIT' | 'SUCCESSFUL' | 'FAILURE'; export type LifeCycleStatus = 'DEFAULT' | 'WAIT' | 'SUCCESSFUL' | 'FAILURE'; export type StepStatus = 'active' | 'inactive' | 'completed'; export type StepsItemView = 'default' | 'positive' | 'warning' | 'negative'; export type TabVariant = 'LIFE_CYCLE' | 'HISTORY';