/**
 * A service row from GET /api/v1/services, via
 * Razorbooking_Admin_Data::services_table(). Only the fields read here are typed.
 */

export interface ApiMedia {
	original_url?: string;
}

export interface ApiService {
	id: number;
	name: string;
	description?: string | null;
	service_type?: string | null;
	price_type?: string | null;
	regular_price?: number | string | null;
	sales_price?: number | string | null;
	custom_label?: string | null;
	price_text?: string | null;
	min?: number | null;
	max?: number | null;
	duration?: number | null;
	is_active: boolean;
	has_variations?: boolean;
	all_staff?: boolean;
	ord?: number;
	mobile_images?: ApiMedia[] | null;
	desktop_images?: ApiMedia[] | null;
	variations?: ApiService[];
	categories?: { id: number; name: string }[];
	users?: { id: number }[];
}

export interface TeamPerson {
	id: number;
	name: string;
	avatar: ApiMedia | null;
}

/** GET razorbooking/v1/services/table. */
export interface ServicesTableProps {
	services: ApiService[];
	categories: { id: number; name: string }[];
	team: TeamPerson[];
	resources: import( '../resources/types' ).ResourceRow[];
	google_meet: { activated: boolean; tenant_integration_id: number | null };
	permissions: string[];
	currency: string;
	booking_url: string | null;
}
