/**
 * Clear Estimates Type Definitions
 *
 * This file contains all the TypeScript type definitions used throughout
 * the Clear Estimates widget. These types represent the data structures
 * used for API requests, responses, and internal state management.
 */
/**
 * Represents a project type/scope that users can select
 * These come from the API and are displayed in the project selection form
 */
export type Scope = {
    title: string;
    description: string;
    category_title: string;
    category_rank: number;
    icons: string[];
    suggest_qty_small: number;
    suggest_qty_avg: number;
    suggest_qty_large: number;
    units: Units;
    scope_id: string;
};
/**
 * Represents a price range with high and low values
 * Used to show cost estimations as a range rather than a single value
 */
export type CostRange = {
    high: number;
    low: number;
};
/**
 * Represents a cost category in the estimate breakdown
 * Each category has material and labor components
 */
export type Category = {
    categoryTitle: string;
    total: number;
    categoryRank: number;
    material: number;
    labor: number;
};
/**
 * Represents a specific part or component in the detailed breakdown
 * This is the most granular level of the estimate
 */
export type Parts = {
    category: number;
    cost: number;
    costPerUnit: number;
    description: string;
    name: string;
    quantityPerTemplateUnit: number;
    unitType: string;
};
/**
 * Aggregates all cost information for an estimate
 * Includes both summary and detailed breakdowns
 */
export type Costs = {
    range: CostRange;
    summary: Category[];
    detail: Parts[];
};
/**
 * Represents units of measurement for a project
 * Includes singular, plural, and abbreviated forms
 */
export type Units = {
    single: string;
    plural: string;
    abbreviation: string;
};
/**
 * Represents a complete estimate for a single project
 * Contains all pricing data for display in the summary
 */
export type Estimate = {
    id: string;
    units: Units;
    type: number;
    costs: Costs;
    title: string;
    included: boolean;
    description: string;
    range: CostRange;
    summary: Category[];
    detail: Parts[];
    quantity: number;
    units_label: string;
};
/**
 * Represents the overall project containing multiple estimates
 * This is what's displayed in the final summary view
 */
export type Project = {
    zipCode?: number;
    estimates: Estimate[];
    units?: string;
    description?: string;
    estimate_id?: string;
};
/**
 * Represents a single project request in the API payload
 * Used when requesting estimates for specific projects
 */
export type SingleRequestedEstimate = {
    id: number;
    scopeid: string;
    quantity?: number;
    zipCode?: number;
    units?: string;
    description?: string;
};
/**
 * The structure of the API request body for creating estimates
 */
export type EstimateRequestBody = {
    estimateArray?: SingleRequestedEstimate[];
    type?: 1 | 2 | 3;
};
/**
 * The structure of the API response when creating estimates
 */
export type EstimateResponse = {
    estimate_id: string;
    estimates: Estimate[];
};
/**
 * Represents project types grouped by category for display in the UI
 * This is a transformed version of the scopes data from the API
 */
export type GroupedScopes = {
    options: Scope[];
    label: string;
    rank: number;
    category_id: string;
};
