// =============================================================================
// 🧩 ТИПЫ ДЛЯ UI BLOCKS
// =============================================================================

import type {
  FulfillmentConsumableSupplier,
  FulfillmentConsumableProduct,
  SelectedFulfillmentConsumable,
} from '../types'

// 📄 ТИПЫ ДЛЯ ЗАГОЛОВКА СТРАНИЦЫ
export interface PageHeaderProps {
  onBack: () => void
}

// 🏢 ТИПЫ ДЛЯ БЛОКА ПОСТАВЩИКОВ
export interface SuppliersBlockProps {
  suppliers: FulfillmentConsumableSupplier[]
  filteredSuppliers: FulfillmentConsumableSupplier[]
  selectedSupplier: FulfillmentConsumableSupplier | null
  searchQuery: string
  loading: boolean
  onSelectSupplier: (supplier: FulfillmentConsumableSupplier | null) => void
  onSearchChange: (query: string) => void
}

// 📦 ТИПЫ ДЛЯ БЛОКА РАСХОДНИКОВ
export interface ConsumablesBlockProps {
  selectedSupplier: FulfillmentConsumableSupplier | null
  products: FulfillmentConsumableProduct[]
  productsLoading: boolean
  productSearchQuery: string
  getSelectedQuantity: (productId: string) => number
  onProductSearchChange: (query: string) => void
  onUpdateQuantity: (productId: string, quantity: number) => void
  formatCurrency: (amount: number) => string
}

// 🛒 ТИПЫ ДЛЯ БЛОКА КОРЗИНЫ
export interface ShoppingCartBlockProps {
  selectedConsumables: SelectedFulfillmentConsumable[]
  deliveryDate: string
  notes: string
  selectedLogistics: FulfillmentConsumableSupplier | null
  logisticsPartners: FulfillmentConsumableSupplier[]
  isCreatingSupply: boolean
  getTotalAmount: () => number
  getTotalItems: () => number
  formatCurrency: (amount: number) => string
  onUpdateQuantity: (productId: string, quantity: number) => void
  onSetDeliveryDate: (date: string) => void
  onSetNotes: (notes: string) => void
  onSetLogistics: (logistics: FulfillmentConsumableSupplier | null) => void
  onCreateSupply: () => void
}