import { gql } from '@apollo/client/core';

export const CUSTOMERS_QUERY = gql`
	query Customers($filter: CustomerFilter) {
		customers(filter: $filter) {
			id
			name
			status
			isActive
			waveCustomerId
			accounts {
				id
			}
		}
	}
`;

export type EntityStatus = 'ACTIVE' | 'INACTIVE' | 'PENDING';

export interface CustomerFilterInput {
	name?: string;
	status?: EntityStatus;
	isActive?: boolean;
}

export interface CustomerListItem {
	id: string;
	name: string;
	status: EntityStatus;
	isActive: boolean;
	waveCustomerId: string | null;
	accounts: { id: string }[];
}

export interface CustomersQueryResult {
	customers: CustomerListItem[];
}
