# -*- coding: utf-8 -*-
# Part of Biztech Consultancy. See LICENSE file for full copyright and licensing details.

from openerp import api, fields, models


class ProductCategorySlider(models.Model):
    _name = 'product.category.slider.config'

    name = fields.Char(string="Nombre del Slider", default='Ultimas Tendencias de la Moda', required=True,
                       translate=True,
                       help="Nombre del Titulo que sera mostrado en la página web...")
    active = fields.Boolean(string="Activo", default=True)
    no_of_counts = fields.Selection([('3', '3'), ('4', '4'), ('5', '5'), ('6', '6')], string="Cantidad",
                                    default='4', required=True,
                                    help="Cantidad de Productos que seran mostrados en el slide.")
    prod_cat_type = fields.Selection([('product', 'Producto'), ('category', 'Categoria')],
                                     string="Tipo de Slider", default='product', required=True,
                                     help="Elija Producto o Categoira para mostrar en este slider.")
    auto_rotate = fields.Boolean(string='Auto Rotar Slider', default=True)
    sliding_speed = fields.Integer(string="Velocidad del Slider", default='5000',
                                   help='Velocidad del Slide en milisegundos.')
    collections_product = fields.Many2many('product.template', 'king_pro_product_slider_rel', 'slider_id',
                                           'prod_id', string="Colecciones de Productos")
    collections_category = fields.Many2many('product.public.category', 'king_pro_category_slider_rel',
                                            'slider_id', 'cat_id', string="Colecciones de Categorias")


class BlogSlider(models.Model):

    _name = 'blog.slider.config'

    name = fields.Char(string="Nombre de Slider", default='Blogs', translate=True,
                       help="Nombre del Slide que sera mostrado en la página web..",
                       required=True)
    active = fields.Boolean(string="Activo", default=True)
    no_of_counts = fields.Selection([('1', '1'), ('2', '2'), ('3', '3')], string="Cantidad",
                                    default='3', help="Cantidad de Blogs que seran mostrados en la página web.", required=True)
    auto_rotate = fields.Boolean(string='Auto Rotar Slider', default=True)
    sliding_speed = fields.Integer(string="Velocidad del Slider", default='5000',
                                   help='Velocidad del Slider en milisegundos.')
    collections_blog_post = fields.Many2many('blog.post', 'blogpost_slider_rel', 'slider_id',
                                             'post_id', string="Colecciones de publicaciones del blog", required=True)


class MultiSlider(models.Model):
    _name = 'multi.slider.config'

    name = fields.Char(string="Nombre del Slider", default='Lanzamientos',
                       required=True, translate=True,
                       help="Slider title to be displayed on website like Best products, Latest and etc...")
    active = fields.Boolean(string="Activo", default=True)

    auto_rotate = fields.Boolean(string='Auto-rotar Slide', default=True)
    sliding_speed = fields.Integer(string="Velocidad de deslizamiento", default='5000',
                                   help='Velocidad del Slider en milisegundos.')

    no_of_collection = fields.Selection([('2', '2'), ('3', '3'), ('4', '4'), ('5', '5')],
                                        string="No. de Pestañas a Mostrar", default='2',
                                        required=True,
                                        help="Numero de Colecciones a mostrar.")

    label_collection_1 = fields.Char(string="1er pestaña a Motrar", default='Primera Colección',
                                     required=True, translate=True,
                                     help="Collection label to be displayed in website like Men, Women, Kids, etc...")
    collection_1_ids = fields.Many2many('product.template', 'product_slider_collection_1_rel', 'slider_id',
                                        'prod_id',
                                        required=True,
                                        string="1ro Seleccionar Productos")

    label_collection_2 = fields.Char(string="2da pestaña a Motrar", default='Segunda Colección',
                                     required=True, translate=True,
                                     help="Collection label to be displayed in website like Men, Women, Kids, etc...")
    collection_2_ids = fields.Many2many('product.template', 'product_slider_collection_2_rel', 'slider_id',
                                        'prod_id',
                                        required=True,
                                        string="2do Seleccionar Productos")

    label_collection_3 = fields.Char(string="3ra pestaña a Motrar", default='Tercera Colección',
                                     translate=True,
                                     # required=True,
                                     help="Collection label to be displayed in website like Men, Women, Kids, etc...")
    collection_3_ids = fields.Many2many('product.template', 'product_slider_collection_3_rel', 'slider_id',
                                        'prod_id',
                                        # required=True,
                                        string="3ro. Seleccionar Productos")

    label_collection_4 = fields.Char(string="4th pestaña a Motrar", default='Cuarta Colección', translate=True,
                                     # required=True,
                                     help="Collection label to be displayed in website like Men, Women, Kids, etc...")
    collection_4_ids = fields.Many2many('product.template', 'product_slider_collection_4_rel', 'slider_id',
                                        'prod_id',
                                        # required=True,
                                        string="4to Seleccionar Productos")

    label_collection_5 = fields.Char(string="5th pestaña a Motrar", default='Quita Colección', translate=True,
                                     # required=True,
                                     help="Collection label to be displayed in website like Men, Women, Kids, etc...")
    collection_5_ids = fields.Many2many('product.template', 'product_slider_collection_5_rel', 'slider_id',
                                        'prod_id',
                                        # required=True,
                                        string="5to Seleccionar Productos")
