import { ISelectItem } from '@/shared/abstractClasses';

export const licenseStatus = {
  ACTIVE: 'ACTIVE',
  SUSPENDED: 'SUSPENDED',
  EXPIRED: 'EXPIRED',
} as const;
export type TLicenseStatus = (typeof licenseStatus)[keyof typeof licenseStatus];

const translates: Record<string, string> = {
  ACTIVE: 'فعال',
  SUSPENDED: 'غیرفعال',
  EXPIRED: 'منقضی شده',
};

export const licenseStatusSelect: ISelectItem[] = Object.keys(licenseStatus)
  .filter((data) => data !== 'EXPIRED')
  .map((key) => ({
    id: key,
    name: translates[key],
  }));

export const licenseStatusLabel = 'وضعیت';
