export type TransactionRoles = Addon & {
  borrowing: boolean;
  assignment: boolean;
  transfer: boolean;
  disposal: boolean;
  registration: boolean;
};

export type Addon = {
  repairTicketing: boolean;
  maintenance: boolean;
  map: boolean;
  tracking: boolean;
  audit: boolean;
  assetControl: boolean;
};

type LicenseStatus = 'Managed' | 'Unmanaged' | null;

export type LicenseStatuses = {
  fixedAsset: LicenseStatus;
  repairTicketing: LicenseStatus;
  maintenance: LicenseStatus;
  tracking: LicenseStatus;
  audit: LicenseStatus;
  assetControl: LicenseStatus;
};

export type RoleData = {
  [key: string]: unknown;
  transactionRoles?: TransactionRoles;
  addOn?: Addon;
  transactions?: TransactionRoles; // For Policy Assets
  licenseStatuses?: LicenseStatuses;
};

export interface TransactionRolesProps {
  asset?: RoleData;
  user?: Omit<RoleData, Addon>;
  /**
   * @default transaction
   */
  type?: 'transaction' | 'addon' | 'transaction-policy';
}

/**
 * **TSVue V2 - TransactionRoles**
 *
 * _TransactionRoles is a component to show list of transaction role._
 *
 * --- ---
 * ![TSVue](https://ik.imagekit.io/kurniadev/TS-HEAD-BLACK.png)
 *
 * @group buttons
 */
declare const TransactionRoles: DefineComponent<TransactionRolesProps>;

export default TransactionRoles;
