<?php
defined('BASEPATH') OR exit('No direct script access allowed');

$route['default_controller']   = 'receipt';
$route['404_override']         = '';
$route['translate_uri_dashes'] = FALSE;

// ── Auth ────────────────────────────────────────────────────
$route['auth/login']  = 'auth/login';
$route['auth/logout'] = 'auth/logout';
$route['login']       = 'auth/login';
$route['logout']      = 'auth/logout';

// ── User Management (Admin only) ────────────────────────────
$route['user']                       = 'user/index';
$route['user/create']                = 'user/create';
$route['user/store']                 = 'user/store';
$route['user/edit/(:num)']           = 'user/edit/$1';
$route['user/update/(:num)']         = 'user/update/$1';
$route['user/delete/(:num)']         = 'user/delete/$1';
$route['user/reset_password/(:num)'] = 'user/reset_password/$1';

// ── Toko ────────────────────────────────────────────────────
$route['store']               = 'store/index';
$route['store/create']        = 'store/create';
$route['store/store']         = 'store/store';
$route['store/edit/(:num)']   = 'store/edit/$1';
$route['store/update/(:num)'] = 'store/update/$1';
$route['store/delete/(:num)'] = 'store/delete/$1';

// ── Template ────────────────────────────────────────────────
$route['template']                    = 'template/index';
$route['template/builder']            = 'template/builder';
$route['template/builder/(:num)']     = 'template/builder/$1';
$route['template/save']               = 'template/save';
$route['template/delete/(:num)']      = 'template/delete/$1';
$route['template/set_default/(:num)'] = 'template/set_default/$1';
$route['template/fields/(:num)']      = 'template/get_fields/$1';

// ── Transaksi ────────────────────────────────────────────────
$route['receipt']                  = 'receipt/index';
$route['receipt/create']           = 'receipt/create';
$route['receipt/store']            = 'receipt/store';
$route['receipt/edit/(:num)']      = 'receipt/edit/$1';
$route['receipt/update/(:num)']    = 'receipt/update/$1';
$route['receipt/delete/(:num)']    = 'receipt/delete/$1';
$route['receipt/print/(:num)']     = 'receipt/print_view/$1';
$route['receipt/get_rawbt/(:num)'] = 'receipt/get_rawbt_data/$1';
$route['receipt/preview_data']     = 'receipt/preview_data';
