<?php

return [
    'breadcrumb_root' => 'Sales',
    'orders' => [
        'title' => 'Sales orders',
        'subtitle' => 'Operational allocation and fulfillment. Deterministic, integrity-first.',
        'show_subtitle' => 'Line-level reservation and fulfillment state.',
        'columns' => [
            'number' => 'Order',
            'status' => 'Status',
            'ordered' => 'Ordered',
            'reserved' => 'Reserved',
            'fulfilled' => 'Fulfilled',
            'remaining' => 'Open (uncommitted)',
            'created' => 'Created',
        ],
        'filters' => [
            'status' => 'Status',
            'all_statuses' => 'All statuses',
            'apply' => 'Apply',
        ],
        'view_badge' => [
            'allocation' => 'Allocation focus',
            'fulfillment' => 'Fulfillment focus',
        ],
        'lines' => [
            'title' => 'Lines',
            'item' => 'Item',
            'warehouse' => 'Warehouse',
            'reservation_id' => 'Reservation public ID',
            'allocation_state' => 'Allocation state',
            'fulfillment_state' => 'Fulfillment state',
            'available_hint' => 'Available (read-only)',
            'insufficient_hint' => 'Insufficient available stock for full allocation of open quantity.',
        ],
        'states' => [
            'allocation' => [
                'none' => 'Not allocated',
                'partial' => 'Partially allocated',
                'complete' => 'Fully covered',
            ],
            'fulfillment' => [
                'none' => 'Not fulfilled',
                'partial' => 'Partially fulfilled',
                'complete' => 'Fulfilled',
            ],
        ],
        'allocate' => [
            'title' => 'Allocate stock (reservation)',
            'help' => 'Enter positive quantities per line. Allocation never exceeds available stock or open line quantity.',
            'confirmation_label' => 'Type ALLOCATE_STOCK to confirm',
            'submit' => 'Allocate',
        ],
        'fulfill' => [
            'title' => 'Fulfill from reservation (final)',
            'help' => 'Consumes reserved stock. You cannot fulfill more than reserved or without an active reservation.',
            'confirmation_label' => 'Type FULFILL_ORDER to confirm',
            'submit' => 'Fulfill',
        ],
        'cancel' => [
            'title' => 'Cancel order',
            'help' => 'Releases open reservations and locks the order as cancelled.',
            'confirmation_label' => 'Type CANCEL_ORDER to confirm',
            'submit' => 'Cancel order',
        ],
        'locked' => [
            'fulfilled' => 'This order is fulfilled. No further operational actions are permitted.',
            'cancelled' => 'This order is cancelled.',
        ],
        'integrity' => [
            'title' => 'Integrity and operational errors',
        ],
    ],
    'flash' => [
        'allocated' => 'Allocation applied.',
        'fulfilled' => 'Fulfillment recorded.',
        'cancelled' => 'Order cancelled and reservations released where applicable.',
    ],
    'errors' => [
        'generic' => 'The operation could not be completed.',
        'insufficient_stock' => 'Insufficient stock to reserve the requested quantity.',
        'insufficient_stock_detail' => 'Insufficient stock: :detail',
        'over_allocation' => 'Over-allocation blocked: requested quantity exceeds open quantity for the line.',
        'fulfill_no_reservation' => 'Fulfillment rejected: line has no reservation.',
        'fulfill_exceeds_reserved' => 'Fulfillment rejected: quantity exceeds reserved quantity.',
        'reservation_drift' => 'Reservation ledger drift detected. Line reserved quantity does not match inventory reservation movements.',
        'allocate_state_invalid' => 'This order status does not allow allocation.',
        'fulfill_state_invalid' => 'This order status does not allow fulfillment.',
        'cancel_invalid' => 'This order cannot be cancelled.',
    ],
    'validation' => [
        'line_not_on_order' => 'Line does not belong to this order.',
        'allocate_qty_required' => 'Enter at least one positive quantity to allocate.',
        'fulfill_qty_required' => 'Enter at least one positive quantity to fulfill.',
    ],
    'confirm' => [
        'allocate' => 'Confirm stock allocation (reservation). This commits reserved inventory to this order.',
        'fulfill' => 'Confirm fulfillment. This consumes reserved stock and is treated as a final operational step.',
        'cancel' => 'Confirm order cancellation. Open reservations will be released.',
    ],
    'bulk' => [
        'allocate_max' => 'Allocate max (selected)',
        'fulfill_max' => 'Fulfill max (selected)',
        'confirm_allocate' => 'Allocate remaining open quantities for :count order(s)?',
        'confirm_fulfill' => 'Fulfill up to reserved quantities for :count order(s)?',
        'not_found' => 'Order not found.',
        'forbidden' => 'Not permitted for this order.',
        'nothing_to_allocate' => 'No open quantity to allocate.',
        'nothing_to_fulfill' => 'No reserved quantity to fulfill.',
        'label_allocate' => 'Bulk allocation',
        'label_fulfill' => 'Bulk fulfillment',
    ],
];
