<?php

namespace App\Settings;

use Spatie\LaravelSettings\Settings;

class InventorySettings extends Settings
{
    // Stock Management
    public int $low_stock_threshold;
    public int $critical_stock_threshold;
    public bool $enable_auto_reorder;
    public int $default_reorder_quantity;
    public int $default_lead_time_days;

    // Pricing Settings
    public float $default_markup_percentage;
    public bool $enable_tiered_pricing;
    public array $price_tiers;
    public bool $include_labor_in_estimates;

    // Additional Pricing Fields (missing)
    public float $default_part_markup = 0.0;
    public float $core_charge_percentage = 0.0;
    public float $shop_supply_fee = 0.0;
    public float $environmental_fee = 0.0;
    public float $waste_oil_fee = 0.0;
    public float $tire_disposal_fee = 0.0;

    // Supplier Settings
    public int $preferred_supplier_count;
    public bool $require_multiple_quotes;
    public float $minimum_order_amount;
    public string $default_payment_terms = '';
    public string $preferred_ordering_method = '';
    public ?float $free_shipping_threshold = null;

    // Additional Boolean Settings (missing)
    public bool $enable_low_stock_alerts = false;
    public bool $track_serial_numbers = false;
    public bool $enable_volume_discounts = false;
    public bool $enable_seasonal_pricing = false;
    public bool $enable_customer_specific_pricing = false;
    public bool $require_po_approval = false;
    public bool $enable_dropship = false;
    public bool $enable_backorders = false;

    // Part Categories
    public array $part_categories;
    public array $part_conditions; // new, used, refurbished, etc.

    // Barcode & Tracking
    public bool $enable_barcode_scanning;
    public bool $track_part_history;
    public bool $enable_serial_tracking;

    public static function group(): string
    {
        return 'inventory';
    }
}
