/**
 * Shared types for Print-on-Demand provider clients (Printful, Prodigi).
 */

export interface PodRecipient {
	name: string;
	email?: string;
	address1: string;
	address2?: string;
	city: string;
	stateCode?: string;
	countryCode: string;
	zip: string;
}

export interface PodOrderItem {
	/** Provider-specific variant or SKU */
	sku: string;
	quantity: number;
	/** Public URL to the design image */
	imageUrl: string;
	/** Placement on the product (e.g. "front", "back") */
	placement?: string;
}

export interface PodOrder {
	id: string;
	provider: "printful" | "prodigi";
	status: string;
	items: PodOrderItem[];
	recipient: PodRecipient;
	tracking?: PodTracking;
	createdAt: string;
	raw?: unknown;
}

export interface PodTracking {
	carrier: string;
	trackingNumber: string;
	trackingUrl: string;
}

export interface PodMockup {
	variantId?: number;
	mockupUrl: string;
	placement: string;
}

export interface PodVariant {
	id: number;
	size: string;
	color: string;
	colorCode: string;
}

export interface PodQuote {
	items: { sku: string; unitCost: number; quantity: number }[];
	shippingCost: number;
	totalCost: number;
	currency: string;
}
