import type { InferResponseType, InferRequestType } from 'hono/client';
import { enterpriseStatisticsClient } from './enterpriseStatisticsClient';

// 使用Hono类型推导 - 注意正确的属性访问语法
export type DisabilityTypeDistributionResponse = InferResponseType<typeof enterpriseStatisticsClient['disability-type-distribution']['$get'], 200>;
export type GenderDistributionResponse = InferResponseType<typeof enterpriseStatisticsClient['gender-distribution']['$get'], 200>;
export type AgeDistributionResponse = InferResponseType<typeof enterpriseStatisticsClient['age-distribution']['$get'], 200>;
export type HouseholdDistributionResponse = InferResponseType<typeof enterpriseStatisticsClient['household-distribution']['$get'], 200>;
export type JobStatusDistributionResponse = InferResponseType<typeof enterpriseStatisticsClient['job-status-distribution']['$get'], 200>;
export type SalaryDistributionResponse = InferResponseType<typeof enterpriseStatisticsClient['salary-distribution']['$get'], 200>;

// 统计卡片响应类型
export type EmploymentCountResponse = InferResponseType<typeof enterpriseStatisticsClient['employment-count']['$get'], 200>;
export type AverageSalaryResponse = InferResponseType<typeof enterpriseStatisticsClient['average-salary']['$get'], 200>;
export type EmploymentRateResponse = InferResponseType<typeof enterpriseStatisticsClient['employment-rate']['$get'], 200>;
export type NewCountResponse = InferResponseType<typeof enterpriseStatisticsClient['new-count']['$get'], 200>;

// API 错误响应类型
export interface ApiErrorResponse {
  code: number;
  message: string;
}

// 查询参数类型推导（支持年月查询参数）
export type DisabilityTypeDistributionParams = Record<string, never>;
export type GenderDistributionParams = Record<string, never>;
export type AgeDistributionParams = Record<string, never>;
export type HouseholdDistributionParams = Record<string, never>;
export type JobStatusDistributionParams = Record<string, never>;
export type SalaryDistributionParams = Record<string, never>;

// 年月查询参数类型（新增的统计卡片 API）
export interface YearMonthParams {
  year?: number;
  month?: number;
}