<?php
require_once __DIR__ . '/../../../Models/Quotation.php';

class QuotationController {
    public function index() {
        $quotationModel = new Quotation();
        
        $page = isset($_GET['p']) ? (int)$_GET['p'] : 1;
        $perPage = 10;
        
        $result = $quotationModel->paginateWithDetails($page, $perPage);
        $quotations = $result['data'];
        
        $total = $result['total'];
        $totalPages = ceil($total / $perPage);

        require __DIR__ . '/../../../../views/admin/quotations/index.php';
    }
}
