import { z } from 'zod';

// Customer feature key literals
export const CustomerFeatureKey = {
  DAccount: 'd-account',
  DNoAccount: 'd-no-account',
  B2B: 'b2b',
  Staff: 'staff',
  BookshelfId: 'bookshelfId',
  P4MAccountId: 'p4mAccountId',
  P4MUser: 'p4mUser',
  Webshop: 'webshop',
  Guest: 'guest',
} as const;

export const CustomerFeatureKeySchema = z
  .enum([
    CustomerFeatureKey.DAccount,
    CustomerFeatureKey.DNoAccount,
    CustomerFeatureKey.B2B,
    CustomerFeatureKey.Staff,
    CustomerFeatureKey.BookshelfId,
    CustomerFeatureKey.P4MAccountId,
    CustomerFeatureKey.P4MUser,
    CustomerFeatureKey.Webshop,
    CustomerFeatureKey.Guest,
  ])
  .describe('Customer feature key');

export type CustomerFeatureKeyType = z.infer<typeof CustomerFeatureKeySchema>;
