import { useStore } from 'zustand'; import { TextTip } from '@@/Tip/TextTip'; import { FormSection } from '@@/form-components/FormSection'; import { summaryStore } from './store'; export type SummaryAction = { action: string; kind: string; name: string; type?: string; }; type Props = { actions?: SummaryAction[]; cpuLimit?: string | null; memoryLimit?: string | null; }; export function KubernetesSummaryView({ actions = [], cpuLimit, memoryLimit, }: Props) { const { isExpanded, setIsExpanded } = useStore(summaryStore); if (actions.length === 0) { return null; } return ( setIsExpanded(!isFolded)} > Portainer will execute the following Kubernetes actions. ); } function getArticle(resourceAction: string): string { if (resourceAction !== 'Create') { return 'the'; } return 'a'; }