import { TAccountType } from '@/core/constants/accountTypes.const';
import ISummary from '@/core/models/summary';
import { IEnumTranslate } from '@/shared/models/enum_translate.type';

export interface IConsumerAccountRawResponse {
  id: string;
  role: IEnumTranslate;
  created_at: string;
  account: AccountInfo;
  pos: Pos;
}
export interface IConsumerAccountResponse extends IConsumerAccountRawResponse {}

export interface IConsumerAccountRequest {
  username: string;
  password?: string;
  // Backend accepts role on create and status on update.
  role?: string;
  status?: string;
  // Keep type optional for current form compatibility.
  type?: TAccountType;
}

interface AccountInfo {
  username: string;
  status: string;
}

interface Pos extends ISummary {
  complex: {
    name: string;
    business_activity: {
      name: string;
    };
  };
}
