<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$route['default_controller'] = 'Auth';
$route['404_override']       = '';
$route['translate_uri_dashes'] = FALSE;

// ── AUTH ──
$route['Auth']                      = 'Auth/index';
$route['Auth/login_validation']     = 'Auth/login_validation';
$route['Auth/logout']               = 'Auth/logout';

// ── DASHBOARD ──
$route['dashboard'] = 'Dashboard/index';

// ── Category Master ──
$route['category']                        = 'Category/index';
$route['category/create']                 = 'Category/create';
$route['category/edit/(:num)']            = 'Category/edit/$1';
$route['category/delete/(:num)']          = 'Category/delete/$1';
$route['category/toggle_status/(:num)']   = 'Category/toggle_status/$1';
$route['category/insert']                 = 'Category/insert';
$route['category/updatedata']             = 'Category/updatedata';

// ── Unit Master ──
$route['unit']                            = 'Unit/index';
$route['unit/create']                     = 'Unit/create';
$route['unit/edit/(:num)']                = 'Unit/edit/$1';
$route['unit/delete/(:num)']              = 'Unit/delete/$1';
$route['unit/toggle_status/(:num)']       = 'Unit/toggle_status/$1';
$route['unit/insert']                     = 'Unit/insert';
$route['unit/updatedata']                 = 'Unit/updatedata';

// ── Product Master ──
$route['product']                         = 'Product/index';
$route['product/create']                  = 'Product/create';
$route['product/edit/(:num)']             = 'Product/edit/$1';
$route['product/view/(:num)']             = 'Product/view/$1';
$route['product/delete/(:num)']           = 'Product/delete/$1';
$route['product/toggle_status/(:num)']    = 'Product/toggle_status/$1';
$route['product/insert']                  = 'Product/insert';
$route['product/updatedata']              = 'Product/updatedata';

// ── Customer Master ──
$route['customer']                        = 'Customer/index';
$route['customer/create']                 = 'Customer/create';
$route['customer/edit/(:num)']            = 'Customer/edit/$1';
$route['customer/view/(:num)']            = 'Customer/view/$1';
$route['customer/delete/(:num)']          = 'Customer/delete/$1';
$route['customer/toggle_status/(:num)']   = 'Customer/toggle_status/$1';
$route['customer/insert']                 = 'Customer/insert';
$route['customer/updatedata']             = 'Customer/updatedata';

// ── Supplier Master ──
$route['supplier']                        = 'Supplier/index';
$route['supplier/create']                 = 'Supplier/create';
$route['supplier/edit/(:num)']            = 'Supplier/edit/$1';
$route['supplier/view/(:num)']            = 'Supplier/view/$1';
$route['supplier/delete/(:num)']          = 'Supplier/delete/$1';
$route['supplier/toggle_status/(:num)']   = 'Supplier/toggle_status/$1';
$route['supplier/insert']                 = 'Supplier/insert';
$route['supplier/updatedata']             = 'Supplier/updatedata';

// ── Purchase Entry ──
$route['purchase']               = 'Purchase_entry/index';
$route['purchase/create']        = 'Purchase_entry/create';
$route['purchase/edit/(:num)']   = 'Purchase_entry/edit/$1';
$route['purchase/view/(:num)']   = 'Purchase_entry/view/$1';
$route['purchase/delete/(:num)'] = 'Purchase_entry/delete/$1';
$route['purchase/insert']        = 'Purchase_entry/insert';
$route['purchase/updatedata']    = 'Purchase_entry/updatedata';

// ── Sales Billing ──
$route['sales']                  = 'Sales_billing/index';
$route['sales/create']           = 'Sales_billing/create';
$route['sales/edit/(:num)']      = 'Sales_billing/edit/$1';
$route['sales/view/(:num)']      = 'Sales_billing/view/$1';
$route['sales/delete/(:num)']    = 'Sales_billing/delete/$1';
$route['sales/insert']           = 'Sales_billing/insert';
$route['sales/updatedata']       = 'Sales_billing/updatedata';

// ── Tailoring Orders ──
$route['tailoring_order']                 = 'Tailoring_order/index';
$route['tailoring_order/create']          = 'Tailoring_order/create';
$route['tailoring_order/edit/(:num)']     = 'Tailoring_order/edit/$1';
$route['tailoring_order/view/(:num)']     = 'Tailoring_order/view/$1';
$route['tailoring_order/delete/(:num)']   = 'Tailoring_order/delete/$1';
$route['tailoring_order/insert']          = 'Tailoring_order/insert';
$route['tailoring_order/updatedata']      = 'Tailoring_order/updatedata';

// ── Reports ──
$route['reports/stock']        = 'Reports/stock';
$route['reports/sales_report'] = 'Reports/sales_report';