home:
    pattern: /
    controller: Home
product:
    pattern: /(catslug)/(id)-(alias)
    controller: Product
    requirements:
        id: \d+
products:
    pattern: /products(/page)
    controller: Products
category:
    pattern: /category/(alias)(/page)
    controller: Products
tag:
    pattern: /tag/(tag)(/page)
    controller: Products

tvs_center:
    pattern: /tvs-center
    controller: Tvs
    extra:
        layout: tvs

tvs_center_detail:
    pattern: /tvs-center/(id)
    controller: Tvs

blog:
    pattern: /blog(/catslug)
    controller: Blog
    extra:
        blog: true
        no_cart_button: true

blog-grid:
    pattern: /blog-grid(/catslug)
    controller: Blog
    extra:
        blog: true
        no_cart_button: true
        layout: grid

article:
    pattern: /blog/post(/alias)
    controller: Article
    extra:
        blog: true
        no_cart_button: true

cart:
    pattern: /cart
    controller: Cart

checkout:
    pattern: /checkout
    controller: Checkout
    extra:
        login: true

checkout_invoice:
    pattern: /checkout/invoice/(id)
    controller: Checkoutinvoice
    extra:
        login: true

checkout_order:
    pattern: /checkout/order/(id)
    controller: Checkoutorder
    extra:
        login: true

addcart:
    pattern: /cart/add
    controller: Product\Ajax
    action:
        '*': AddCartController

removecart:
    pattern: /cart/remove
    controller: Product\Ajax
    action:
        '*': RemoveCartController

addwish:
    pattern: /wish/add
    controller: Product\Ajax
    action:
        '*': AddWishController

comment:
    pattern: /comment
    controller: Comment

# User
login:
    pattern: login
    controller: Login
    action:
        get:  IndexController
        post: LoginController
    extra:
        flower: sakura
logout:
    pattern: logout
    controller: Logout
    variables: {}
registration:
    pattern: registration
    controller: Registration
    variables: {}
registration_freelancer:
    pattern: registration/freelancer
    controller: Registration
    extra:
        layout: freelancer
activate:
    pattern: activate
    controller: Activation
forgot:
    pattern: forgot-password(/task)
    controller: Forgot
reset:
    pattern: reset-password(/token)
    controller: Reset
social-login:
    pattern: social-login
    controller: SocialLogin
auth:
    pattern: auth
    controller: Auth

# User Manager
dashboard:
    pattern: /user/dashboard(/layout)
    controller: Dashboard
    extra:
        login: true

profile:
    pattern: /user/profile(/layout)
    controller: Profile
    extra:
        login: true
freelancer:
    pattern: /freelancer/(id)
    controller: Freelancer
    requirements:
        id: \d+

orders:
    pattern: /user/orders(/page)
    controller: Orders
    action:
        post: CopyController
        patch: BatchController
        put: FilterController
    extra:
        login: true
        active:
            sidenav: orders

invoice:
    pattern: /user/invoice(/id)
    controller: Invoice
    extra:
        login: true
        active:
            sidenav: orders

payment:
    pattern: /payment/(task)/(id)
    controller: Payment
    extra:
        login: true

# PAYPAL
ipn:
    pattern: ipn
    controller: Ipn

downloads:
    pattern: /user/downloads(/page)
    controller: Downloads
    extra:
        login: true
        active:
            sidenav: downloads

download:
    pattern: /user/download
    controller: Download
    extra:
        login: true

download_refresh:
    pattern: /user/refresh-download
    controller: Download
    action:
        '*': RefreshController
    extre:
        login: true

wishes:
    pattern: /user/wishes
    controller: Wishes
    extra:
        login: true
        active:
            sidenav: wishes

request:
    pattern: /user/request
    controller: Request
    extra:
        login: true
        active:
            sidenav: request

history:
    pattern: /user/history(/page)
    controller: History
    action:
        post: CopyController
        patch: BatchController
        put: FilterController
    extra:
        login: true
        active:
            sidenav: history

myproducts:
    pattern: /user/products(/page)
    controller: Myproducts
    extra:
        login: true
        active:
            sidenav: myproducts

myproduct:
    pattern: /user/product(/id)
    controller: Myproduct
    extra:
        login: true
        active:
            sidenav: myproducts

myformat:
    pattern: /user/myproduct/format
    controller: Myproduct\Format
    method:
        - PATCH
        - DELETE
    extra:
        login: true

myvideo:
    pattern: /user/myproduct/video
    controller: Myproduct\Video
    method:
        - PATCH
        - DELETE
    extra:
        login: true

contact:
    pattern: /contact
    controller: Contact

change_language:
    pattern: /language/change/(lang)
    controller: Language
    action:
        '*': SaveController

newsletter_subscription:
    pattern: /newsletter/subscription
    controller: Newsletter

rss:
    pattern: /rss.php
    controller: Rss

# static page

page:
    pattern: /page(/page)
    controller: Page

translate:
    pattern: /translate
    controller: Translate

# Cron
mail_report:
    pattern: /_mail/report
    controller: Mail
    action:
        '*': MonthlyReportController

user_remind:
    pattern: /_mail/remind
    controller: Mail
    action:
        '*': UserRemindController

# API
api_create_customer:
    pattern: /customerapi/index/ceateCustomer1s9xm103kdjsdf923rlsd9sdf
    controller: Api\Customer
    action:
        '*': SaveController

api_product_verification:
    pattern: /s81ns819snaq1xkksdfjd891/hardware/api/approve/email/(email)/model/(model)/serial/(serial)/date/(date)
    controller: Api\Product
    action:
        '*': VerifictaionController

api_freesets_tvs1000:
    pattern: /tvs1000freesets/3dsdf832falsdfjklewra823r
    controller: Api\Download
    action:
        '*': DownloadController
    extra:
        freeset: 1000

api_freesets_tvs2000:
    pattern: /tvs2000freesets/3dsdf832falsdfjklewra823r
    controller: Api\Download
    action:
        '*': DownloadController
    extra:
        freeset: 2000

sso:
    pattern: /sso
    controller: Sso
    action:
        '*': SsoController

captcha_image:
    pattern: /captcha/image
    controller: Captcha
    action:
        '*': GetController
