export type RawMaterialVariant = {
    id: number;
    variant: string;
    price: number;
    stock: number;
    formatted_stock: string;
    photo_url: string | null;
    photo_conversion_url: string | null;
};

export type RawMaterial = {
    id: number;
    name: string;
    unit: string;
    is_active: boolean;
    raw_material_prices: RawMaterialVariant[];
};

export type RawMaterialVariantForEdit = {
    id: number;
    variant: string;
    price: number;
    stock: number;
    photo_key: string | null;
    photo_url: string | null;
};

export type RawMaterialForEdit = {
    id: number;
    name: string;
    unit: string;
    is_active: boolean;
    raw_material_prices: RawMaterialVariantForEdit[];
};

export const UNIT_LABELS: Record<string, string> = {
    kg: 'Kilogram',
    meter: 'Meter',
    yard: 'Yard',
};
