<?xml version="1.0" encoding="UTF-8" ?>

<routes xmlns="http://symfony.com/schema/routing"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">

    <route id="customer.family.config.view" path="/admin/module/CustomerFamily">
        <default key="_controller">CustomerFamily\Controller\Admin\CustomerFamilyAdminController::viewAction</default>
    </route>

    <!-- Customer Family -->
    <route id="customer.family.create" path="/admin/module/CustomerFamily/create" methods="post">
        <default key="_controller">CustomerFamily\Controller\Admin\CustomerFamilyAdminController::createAction</default>
    </route>

    <route id="customer.family.update" path="/admin/module/CustomerFamily/update/{id}" methods="post">
        <default key="_controller">CustomerFamily\Controller\Admin\CustomerFamilyAdminController::updateAction</default>
        <requirement key="id">\d+</requirement>
    </route>

    <route id="customer.family.update.default" path="/admin/module/CustomerFamily/update-default" methods="post">
        <default key="_controller">CustomerFamily\Controller\Admin\CustomerFamilyAdminController::updateDefaultAction</default>
    </route>

    <route id="customer.family.delete" path="/admin/module/CustomerFamily/delete/{id}" methods="post">
        <default key="_controller">CustomerFamily\Controller\Admin\CustomerFamilyAdminController::deleteAction</default>
        <requirement key="id">\d+</requirement>
    </route>

    <route id="customer.family.customer.update" path="/admin/module/CustomerFamily/customer/update" methods="post">
        <default key="_controller">CustomerFamily\Controller\Admin\CustomerFamilyAdminController::customerUpdateAction</default>
    </route>

    <!-- Prices management -->
    <route id="customer.family.price.update" path="/admin/module/CustomerFamily/update-price-calculation" methods="post">
        <default key="_controller">CustomerFamily\Controller\Admin\CustomerFamilyPriceController::updateAction</default>
    </route>

    <route id="customer.family.price.calculate" path="/admin/module/CustomerFamily/calculate-all-prices" methods="get">
        <default key="_controller">CustomerFamily\Controller\Admin\CustomerFamilyPriceController::calculatePricesAction</default>
    </route>

    <route id="customer.family.price.mode.update" path="/admin/CustomerFamily/selectPriceMode" methods="post">
        <default key="_controller">CustomerFamily\Controller\Admin\CustomerFamilyPriceController::updatePriceModeAction</default>
    </route>

    <route id="customer.family.category_restriction" path="/admin/module/CustomerFamily/category_restriction/{customerFamilyId}" methods="post">
        <default key="_controller">CustomerFamily\Controller\Admin\CustomerFamilyAdminController::saveCustomerFamilyCategoryRestriction</default>
        <requirement key="customerFamilyId">\d+</requirement>
    </route>

    <route id="customer.family.brand_restriction" path="/admin/module/CustomerFamily/brand_restriction/{customerFamilyId}" methods="post">
        <default key="_controller">CustomerFamily\Controller\Admin\CustomerFamilyAdminController::saveCustomerFamilyBrandRestriction</default>
        <requirement key="customerFamilyId">\d+</requirement>
    </route>
</routes>
