/**
 * AppConstants — Shared option arrays and configuration values.
 *
 * Used by: LocationDetails, ScanObservationForm, EnterpriseMouldAssessment,
 * and any future form components.
 */
var AppConstants = {
    ROOM_TYPES: [
        'Foyer', 'Main Bedroom', 'Second Bedroom', 'Third Bedroom', 'Fourth Bedroom',
        'Fifth Bedroom', 'Kitchen', 'Pantry', 'Storage', 'Walk-in Wardrobe',
        'Living Room', 'Nursery', 'Bathroom', 'Second Bathroom', 'Third Bathroom',
        'Toilet', 'Second Toilet', 'Third Toilet', 'Laundry Room', 'Family Room',
        'Game Room', 'Guest Room', 'Library', 'Home Office', 'Garage', 'Gym',
        'Pool', 'Porch', 'Deck', 'Sun Room', 'Balcony', 'Home Theatre',
        'Attic', 'Conservatory', 'Basement',
    ],

    BUILDING_TYPES: [
        'House', 'Terraced House', 'Apartment', 'Town House',
        'Cottage', 'Mansion', 'Commercial', 'Municipal',
    ],

    // Standard observation options (used by ScanObservationForm)
    ODOUR_OPTIONS: ['None', 'Faint', 'Mild', 'Moderate', 'Strong'],

    TEXTURE_OPTIONS: ['Damp', 'Flaking', 'Bubbling Paint', 'Furry', 'Slimy', 'Powdery'],

    // ── Enterprise Assessment Constants (used by EnterpriseMouldAssessment) ──

    // DMAT scoring scale: 0=none, 1=≤ sheet of paper, 2=paper→door, 3=≥ door
    DMAT_SCORE_LABELS: [
        { value: 0, label: '0', desc: 'None' },
        { value: 1, label: '1', desc: '≤ Sheet of paper' },
        { value: 2, label: '2', desc: 'Paper → Door' },
        { value: 3, label: '3', desc: '≥ Standard door' },
    ],

    // Component rows in the DMAT matrix
    ASSESSMENT_COMPONENTS: [
        {
            key: 'ceiling',
            label: 'Ceiling',
            icon: 'top_panel_close',
            materials: ['Ceiling Tile', 'Plaster', 'Concrete', 'Sheet Rock', 'Metal', 'Wood', 'Other'],
            assessmentNotes: ['Peeling Paint', 'Rust', 'Staining', 'Efflorescence', 'Condensation'],
        },
        {
            key: 'walls',
            label: 'Wall',
            icon: 'rectangle',
            materials: ['Sheet Rock', 'Plaster', 'Concrete', 'Block', 'Brick', 'Tile', 'Wood', 'Other'],
            assessmentNotes: ['Peeling Paint', 'Efflorescence', 'Staining', 'Rust', 'Condensation'],
        },
        {
            key: 'floor',
            label: 'Floor',
            icon: 'floor',
            materials: ['Wood', 'Carpet', 'Vinyl', 'Ceramic', 'Concrete', 'Tile', 'Other'],
            assessmentNotes: ['Buckling', 'Staining', 'Warping', 'Discolouration'],
        },
        {
            key: 'windows',
            label: 'Windows',
            icon: 'window',
            materials: ['Exterior', 'Interior', 'Skylight', 'Frame', 'Sill', 'Other'],
            assessmentNotes: ['Peeling Paint', 'Condensation', 'Rust', 'Staining'],
        },
        {
            key: 'furnishings',
            label: 'Furnishings',
            icon: 'chair',
            materials: ['Furniture', 'Mechanical', 'Sink', 'Toilet', 'Copier', 'Upholstery', 'Other'],
            assessmentNotes: ['Peeling Paint', 'Rust', 'Staining', 'Discolouration'],
        },
        {
            key: 'hvac',
            label: 'HVAC Systems',
            icon: 'hvac',
            materials: ['Radiator', 'Forced-Air', 'Fan', 'Unit Ventilator', 'Window Unit', 'Ducting', 'Other'],
            assessmentNotes: ['Peeling Paint', 'Rust', 'Staining', 'Blockage'],
        },
        {
            key: 'supplies',
            label: 'Supplies & Materials',
            icon: 'inventory_2',
            materials: ['Books', 'Boxes', 'Equipment', 'Clothing', 'Paper', 'Other'],
            assessmentNotes: ['Wrinkled Pages', 'Crumpled Boxes', 'Staining', 'Discolouration'],
        },
        {
            key: 'pipes',
            label: 'Pipes',
            icon: 'plumbing',
            materials: ['Plumbing', 'Gas', 'Drainage', 'Insulation', 'Other'],
            assessmentNotes: ['Peeling Paint', 'Rust', 'Corrosion', 'Leaking'],
        },
    ],

    // Risk classification levels
    RISK_LEVELS: ['Low', 'Medium', 'High', 'Critical'],

    // Remediation methods
    REMEDIATION_METHODS: [
        'HEPA Vacuuming',
        'Damp Wipe (Detergent)',
        'Antimicrobial Treatment',
        'Dry Ice Blasting',
        'Soda Blasting',
        'Encapsulation',
        'Removal & Disposal',
        'Structural Drying',
        'Fogging / Misting',
        'UV-C Treatment',
    ],

    // PPE levels
    PPE_LEVELS: [
        'Level 1 — Gloves & N95 Mask',
        'Level 2 — Full Coveralls & Respirator',
        'Level 3 — Full PPE with PAPR',
        'Level 4 — Full Hazmat Suit',
    ],

    // Containment types
    CONTAINMENT_TYPES: [
        'None Required',
        'Mini Containment',
        'Full Containment',
        'Negative Pressure Enclosure',
    ],

    SPECIALIST_CATEGORY_ICONS: {
        'Air Quality Testing': 'air',
        'Contract Cleaning':   'cleaning_services',
        'Mould Cleaning':      'cleaning_services',
        'Mould Inspection':    'search',
        'Mould Remediation':   'construction',
        'Mould Testing':       'science',
        'Mycology Lab':        'biotech',
    },
};

window.AppConstants = AppConstants;
