parameters:
    oro_chart.config_provider.class:               Oro\Bundle\ChartBundle\Model\ConfigProvider
    oro_chart.view_builder.class:                  Oro\Bundle\ChartBundle\Model\ChartViewBuilder
    oro_chart.options_builder.class:               Oro\Bundle\ChartBundle\Model\ChartOptionsBuilder
    oro_chart.data_transformer.factory.class:      Oro\Bundle\ChartBundle\Model\Data\Transformer\TransformerFactory
    oro_chart.data_transformer.pie_chart.class:    Oro\Bundle\ChartBundle\Model\Data\Transformer\PieChartDataTransformer
    oro_chart.form.type.settings.class:            Oro\Bundle\ChartBundle\Form\Type\ChartSettingsType
    oro_chart.form.type.class:                     Oro\Bundle\ChartBundle\Form\Type\ChartType
    oro_chart.form.type.settings.collection.class: Oro\Bundle\ChartBundle\Form\Type\ChartSettingsCollectionType
    oro_chart.form.event_listener.chart.class:     Oro\Bundle\ChartBundle\Form\EventListener\ChartTypeEventListener

services:
    oro_chart.config_provider:
        class: %oro_chart.config_provider.class%
        arguments:
            - []

    oro_chart.view_builder:
        class: %oro_chart.view_builder.class%
        scope: prototype
        arguments:
            - '@oro_chart.config_provider'
            - '@oro_chart.data_transformer.factory'
            - '@twig'

    oro_chart.form.type.settings:
        class: %oro_chart.form.type.settings.class%
        arguments:
            - '@oro_chart.config_provider'
        tags:
            - { name: form.type, alias: oro_chart_setting }

    oro_chart.form.type.settings.collection:
        class: %oro_chart.form.type.settings.collection.class%
        tags:
            - { name: form.type, alias: oro_chart_settings_collection }

    oro_chart.form.type:
        class: %oro_chart.form.type.class%
        arguments:
            - '@oro_chart.config_provider'
        tags:
            - { name: form.type, alias: oro_chart }
        calls:
             - [setEventListener,  ['@oro_chart.form.event_listener.chart']]

    oro_chart.form.event_listener.chart:
        class: %oro_chart.form.event_listener.chart.class%

    oro_chart.data_transformer.factory:
        class: %oro_chart.data_transformer.factory.class%
        arguments:
            - '@service_container'

    oro_chart.data_transformer.pie_chart:
        class: %oro_chart.data_transformer.pie_chart.class%

    oro_chart.options_builder:
        class: %oro_chart.options_builder.class%
