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

export type CreateAdvertisementRequest = InferRequestType<typeof advertisementClient.index.$post>['json'];
export type UpdateAdvertisementRequest = InferRequestType<typeof advertisementClient[':id']['$put']>['json'];
export type AdvertisementResponse = InferResponseType<typeof advertisementClient.index.$get, 200>['data'][0];
export type AdvertisementListResponse = InferResponseType<typeof advertisementClient.index.$get, 200>;

export interface AdvertisementFormData {
  title: string;
  typeId: number;
  code: string;
  url?: string;
  imageFileId?: number;
  sort: number;
  status: number;
  actionType: number;
}

export interface AdvertisementSearchParams {
  page: number;
  limit: number;
  search: string;
}