/// <reference types="cypress" />

declare global {
  namespace Cypress {
    interface AdminListMockOptions {
      users?: Record<string, any>[];
      offset?: number;
      limit?: number;
      total?: number;
      statusCode?: number;
      delay?: number;
      alias?: string;
      query?: Record<string, string | number>;
    }

    interface MutationMockOptions {
      statusCode?: number;
      delay?: number;
      alias?: string;
      message?: string;
      body?: Record<string, any>;
    }

    interface Chainable {
      loginAsAdmin(): Chainable<void>;
      getByCy(value: string): Chainable<JQuery<HTMLElement>>;
      setAuthCookies(userOverrides?: Partial<Record<string, any>>): Chainable<void>;
      mockAdminsList(options?: AdminListMockOptions): Chainable<void>;
      mockCreateAdmin(options?: MutationMockOptions): Chainable<void>;
      mockUpdateAdmin(id: string, options?: MutationMockOptions): Chainable<void>;
      mockDeleteAdmin(id: string, options?: MutationMockOptions): Chainable<void>;
      mockChangeAdminStatus(
        id: string,
        options?: MutationMockOptions,
      ): Chainable<void>;
    }
  }
}

export {};
