<?php
    use yii\image\drivers\Kohana_Image;
    use yii\imagine\Image;
    
    return [
        'language'   => 'ru',
        'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
        'components' => [
//            'assetManager' => [
//                'bundles' => [
//                    'yii\web\JqueryAsset' => [
//                        'jsOptions' => [ 'position' => \yii\web\View::POS_HEAD ],
//                    ],
//                ],
//            ],
            
            'sms' => [
                'class' => 'common\components\SmsSender',
            ],
            
            'cache' => [
                'class' => 'yii\caching\FileCache',
            ],
            
            'i18n'        => [
                'translations' => [
                    '*'              => [
                        'class'    => 'yii\i18n\PhpMessageSource',
                        'basePath' => '@common/translation',
                        'fileMap'  => [
                            'app'       => 'app.php',
                            'app/error' => 'error.php',
                        ],
                    ],
                    'app'            => [
                        'class'    => 'yii\i18n\PhpMessageSource',
                        'basePath' => '@common/translation',
                        'fileMap'  => [
                            'app'       => 'app.php',
                            'app/error' => 'error.php',
                        ],
                    ],
                    'artbox-comment' => [
                        'class'    => 'yii\i18n\PhpMessageSource',
                        'basePath' => '@common/modules/comment/messages',
                    ],
                ],
            ],
            'artboximage' => [
                'class'    => 'common\components\artboximage\ArtboxImage',
                'driver'   => 'GD',
                'rootPath' => Yii::getAlias('@storage'),
                'rootUrl'  => Yii::getAlias('/storage'),
                'presets'  => [
                    'product'                  => [
                        'resize' => [
                            'width'  => 360,
                            'height' => 360,
                            'master' => NULL,
                        ],
                    ],
                    'product_variant'          => [
                        'resize' => [
                            'width'  => 38,
                            'height' => 38,
                            'master' => NULL,
                        ],
                    ],
                    'product_trumb2'           => [
                        'resize' => [
                            'width'  => 88,
                            'height' => 88,
                            'master' => NULL,
                        ],
                    ],
                    'product_basket'           => [
                        'resize' => [
                            'width'  => 100,
                            'height' => 200,
                            'master' => NULL,
                        ],
                    ],
                    'product_view'             => [
                        'resize' => [
                            'width'  => 392,
                            'height' => 365,
                            'master' => NULL,
                        ],
                    ],
                    'iam'                      => [
                        'resize' => [
                            'width'  => 120,
                            'height' => 240,
                            'master' => NULL,
                        ],
                    ],
                    'slider'                   => [
                        'resize' => [
                            'width'  => 720,
                            'height' => 340,
                            'master' => NULL,
                        ],
                    ],
                    'brandlist'                => [
                        'resize' => [
                            'width'  => 128,
                            'height' => 128,
                            'master' => NULL,
                        ],
                    ],
                    'eventlist'                => [
                        'resize' => [
                            'width'  => 180,
                            'height' => 125,
                            'master' => NULL,
                        ],
                    ],
                    'brand_item'               => [
                        'resize' => [
                            'width'  => 150,
                            'height' => 150,
                            'master' => NULL,
                        ],
                        'crop'   => [
                            'width'  => 150,
                            'height' => 150,
                            'master' => NULL,
                        ],
                    ],
                    'mainmenu'                 => [
                        'resize' => [
                            'width'  => 160,
                            'height' => 170,
                            'master' => NULL,
                        ],
                    ],
                    'list'                     => [
                        'resize' => [
                            'width'  => 134,
                            'height' => 200,
                            'master' => NULL,
                        ],
                    ],
                    'large'                    => [
                        'resize' => [
                            'width'  => 600,
                            'height' => 600,
                            'master' => NULL,
                        ],
                    ],
                    'admin_thumb'              => [
                        'resize' => [
                            'width' => 256,
                        ],
                    ],
                    'option_menu'              => [
                        'resize' => [
                            'width'  => 100,
                            'height' => 110,
                        ],
                    ],
                    'article_list'             => [
                        'resize' => [
                            'width'  => 555,
                            'height' => 299,
                        ],
                    ],
                    'project_list'             => [
                        'resize' => [
                            'width'  => 165,
                            'height' => 100,
                        ],
                    ],
                    'slider_main'              => [
                        'resize' => [
                            'width'  => 1140,
                            'height' => 460,
                        ],
                    ],
                    'filter_image'             => [
                        'resize' => [
                            'width'  => 262,
                            'height' => 144,
                        ],
                    ],
                    'full_filter'              => [
                        'resize' => [
                            'width'  => 653,
                            'height' => 353,
                        ],
                    ],
                    'brand_image_filter'       => [
                        'resize' => [
                            'width' => 100,
                        ],
                    ],
                    'brand_collection_variant' => [
                        'resize' => [
                            'width'  => 116,
                            'height' => 116,
                            'master' => Kohana_Image::ADAPT,
                        ],
                    ],
                    'collection_gallery' => [
                        'resize' => [
                            'width' => 350,
                            'height' => 260,
                        ],
                    ],
                    'basket_item' => [
                        'resize' => [
                            'width' => 67,
                            'height' => 67,
                        ],
                    ],
                ],
            ],
            'basket'      => [
                'class' => 'common\models\Basket',
            ],
        ],
        'modules'    => [
            'file'           => [
                'class' => 'common\modules\file\Module',
            ],
            'artbox-comment' => [
                'class' => 'common\modules\comment\Module',
            ],
        ],
    ];
