services:
    notimeo.classifieds_conditions:
        class: App\ClassifiedsBundle\Services\ClassifiedConditionsService
        arguments:
            - '@translator.default'

    notimeo.classifieds_highlighted:
        class: App\ClassifiedsBundle\Services\ClassifiedHighlightedService
        arguments:
            - '@translator.default'

    notimeo.classifieds_condition_type:
        class: App\ClassifiedsBundle\Form\Type\ClassifiedsConditionsType
        arguments:
            - '@notimeo.classifieds_conditions'
        tags:
            - { name: form.type }

    notimeo.classifieds_highlighted_type:
        class: App\ClassifiedsBundle\Form\Type\ClassifiedsHighlightedType
        arguments:
            - '@notimeo.classifieds_highlighted'
        tags:
            - { name: form.type }

    notimeo.classifieds.form.type.select:
        class: App\ClassifiedsBundle\Form\Type\ClassifiedCategorySelectType
        arguments:
            - "@request_stack"
            - "@notimeo.tree"
            - "@doctrine.orm.entity_manager"
        tags:
            - { name: form.type }

    notimeo.classifieds.form.type.category_picker:
        class: App\ClassifiedsBundle\Form\Type\ClassifiedCategoryPickerType
        arguments:
            - "@doctrine.orm.entity_manager"
        tags:
            - { name: form.type }

    notimeo.classifieds.twig.extension:
        class: App\ClassifiedsBundle\Twig\ClassifiedsExtension
        arguments:
            - '@notimeo.classifieds_highlighted'
            - '@doctrine.orm.entity_manager'
            - '@notimeo.sections_container'
            - '@twig'
            - '@notimeo.tree'
            - '@notimeo.classifieds.counter'
        public: false
        tags:
            - { name: twig.extension }

    notimeo.classifieds.listener.breadcrumbs:
        class: App\ClassifiedsBundle\EventListener\ClassifiedsBreadcrumbListener
        tags:
            - { name: kernel.event_listener, event: notimeo.breadcrumbs }
        arguments:
            - '@app.breadcrumbs_services'
            - '@notimeo.sections_container'
            - '@translator.default'

    notimeo.classifieds.listener.payments:
        class: App\ClassifiedsBundle\EventListener\ClassifiedsPaymentsListener
        tags:
            - { name: kernel.event_listener, event: dotpay.thanks }
            - { name: kernel.event_listener, event: dotpay.clicked }
            - { name: kernel.event_listener, event: dotpay.completed }
            - { name: kernel.event_listener, event: dotpay.rejected }
            - { name: kernel.event_listener, event: dotpay.sms_payment_init }
        arguments:
            - '@session'

    notimeo.classifieds.form.search_engine:
        class: App\ClassifiedsBundle\Form\Type\SearchClassifiedsType
        tags:
            - { name: form.type }
        arguments:
            - '@router'
            - '@notimeo.sections_container'
            - "@request_stack"

    notimeo.classifieds.form.adv_search_engine:
        class: App\ClassifiedsBundle\Form\Type\ClassifiedsAdvancedSearchType
        tags:
            - { name: form.type }
        arguments:
            - '@router'
            - '@notimeo.sections_container'
            - "@request_stack"

    notimeo.classifieds.form.add:
        class: App\ClassifiedsBundle\Form\Type\ClassifiedAddType
        tags:
            - { name: form.type }
        arguments:
            - '@doctrine'
            - '@security.token_storage'

    App\ClassifiedsBundle\Form\Type\ClassifiedEditType:
        class: App\ClassifiedsBundle\Form\Type\ClassifiedEditType
        tags:
            - { name: form.type }
        arguments:
            - '@doctrine'
            - '@security.token_storage'

    notimeo.classifieds.counter:
        class: App\ClassifiedsBundle\Services\ClassifiedsCounter
        arguments:
            - '@doctrine.orm.entity_manager'

    notimeo.classifieds_sitemap_listener:
        class: App\ClassifiedsBundle\EventListener\ClassifiedsSitemapListener
        tags:
            - { name: kernel.event_listener, event:  notimeo.sitemap}