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

/* ==========================================================================
 * BLOOM IRIS AGENCY — ROUTES
 * Full replacement file. Public routes first, then admin module routes.
 * ======================================================================= */

$route['default_controller'] = 'home';
$route['404_override']       = 'home/not_found';
$route['translate_uri_dashes'] = FALSE;

/* --------------------------------------------------------------------------
 * PUBLIC FRONT-END
 * ----------------------------------------------------------------------- */
$route['home']                       = 'home/index';

$route['about']                      = 'about/index';

$route['services']                   = 'services/index';
$route['services/view/(:any)']       = 'services/detail/$1';

$route['portfolio']                  = 'portfolio/index';
$route['portfolio/category/(:any)']  = 'portfolio/category/$1';
$route['portfolio/view/(:any)']      = 'portfolio/detail/$1';

$route['events']                     = 'events/index';
$route['events/view/(:any)']         = 'events/detail/$1';
$route['events/rsvp/(:num)']         = 'events/rsvp/$1';

$route['talent']                     = 'talent/index';
$route['talent/category/(:any)']     = 'talent/category/$1';
$route['talent/view/(:any)']         = 'talent/detail/$1';

$route['partners']                   = 'partners/index';

$route['blog']                       = 'blog/index';
$route['blog/category/(:any)']       = 'blog/category/$1';
$route['blog/view/(:any)']           = 'blog/detail/$1';

$route['contact']                    = 'contact/index';
$route['contact/submit']             = 'contact/submit';

/* Applications & inquiries */
$route['apply/talent']               = 'apply/talent';
$route['apply/talent/submit']        = 'apply/talent_submit';
$route['apply/brand']                = 'apply/brand';
$route['apply/brand/submit']         = 'apply/brand_submit';
$route['newsletter/subscribe']       = 'home/newsletter';

/* Paystack ticketing */
$route['pay/ticket/(:num)']          = 'pay/ticket/$1';
$route['pay/verify']                 = 'pay/verify';
$route['pay/callback']               = 'pay/callback';

/* Utility */
$route['sitemap.xml']                = 'sitemap/index';
$route['instagram/feed']             = 'home/instagram_feed';

/* --------------------------------------------------------------------------
 * ADMIN MODULE  (HMVC: application/modules/admin/)
 * ----------------------------------------------------------------------- */
$route['admin']                      = 'admin/dashboard/index';
$route['admin/login']                = 'admin/login/index';
$route['admin/login/submit']         = 'admin/login/submit';
$route['admin/logout']               = 'admin/login/logout';
$route['admin/dashboard']            = 'admin/dashboard/index';

/* Admin — content modules. The HMVC router resolves admin/<ctrl>/<method>
 * to application/modules/admin/ automatically; these entries keep the
 * default (index) URLs tidy and explicit. */
$route['admin/media']                = 'admin/media/index';
$route['admin/applications']         = 'admin/applications/index';
$route['admin/inquiries']            = 'admin/inquiries/index';
$route['admin/tickets']              = 'admin/tickets/index';
$route['admin/users']                = 'admin/users/index';
$route['admin/settings']             = 'admin/settings/index';
