import type { z } from "zod";
import type {
  createProductTypeSchema,
  updateProductTypeSchema,
  productTypeListQuerySchema,
  productTypeIdParamSchema,
  productTypeSlugParamSchema,
} from "../validators/productTypeValidators.js";

export type CreateProductTypeInput = z.infer<typeof createProductTypeSchema>;
export type UpdateProductTypeInput = z.infer<typeof updateProductTypeSchema>;
export type ProductTypeListQuery = z.infer<typeof productTypeListQuerySchema>;
export type ProductTypeIdParam = z.infer<typeof productTypeIdParamSchema>;
export type ProductTypeSlugParam = z.infer<typeof productTypeSlugParamSchema>;

export type ProductTypeAdminListItem = {
  id: number;
  name: string;
  slug: string;
  isActive: boolean;
  media: Array<{
    id: number;
    url: string;
    altText: string | null;
    isPrimary: boolean;
    sortOrder: number;
  }>;
  productCount: number;
  createdAt: Date;
  updatedAt: Date;
};

export type ProductTypeAdminDetail = ProductTypeAdminListItem;
