import { K8sResourceCommon } from '@openshift-console/dynamic-plugin-sdk';

export const PAUSE_ANNOTATION = 'project-pause-operator.openshift.io/paused';

export const isProjectPaused = (annotations: Record<string, string> = {}): boolean => {
  return annotations[PAUSE_ANNOTATION] === 'true';
};

export const getPauseStateFromNamespace = (namespace: K8sResourceCommon): boolean => {
  return isProjectPaused(namespace?.metadata?.annotations);
};
