'use strict';

Object.defineProperty(exports, "__esModule", {
    value: true
});

require('./index.less');

var _icon = require('../icon');

var _icon2 = _interopRequireDefault(_icon);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var Stepper = {
    name: 'SnStepper',

    props: {
        mode: {
            type: String, //horizontal（水平）;  vertical（垂直）;
            'default': 'horizontal'
        },
        maxSize: {
            type: Number,
            'default': Infinity
        },
        delType: {
            type: String,
            'default': 'minus'
        },
        addType: {
            type: String,
            'default': 'plus'
        },
        title: {
            type: String,
            'default': ''
        },
        value: {}
    },
    data: function data() {
        return {
            collapse: [0],
            size: 1,
            list: []
        };
    },
    created: function created() {},

    methods: {
        handleRemove: function handleRemove(index) {
            this.size--;
            this.list = this.list.splice(index, 1);
            this.$emit('input', this.list);
        },
        handleAdd: function handleAdd() {
            this.collapse.push(this.size);
            this.size++;
        },
        change: function change(value) {
            console.log(value);
        }
    },
    render: function render() {
        var h = arguments[0];

        return h(
            'div',
            { 'class': 'sn-stepper' },
            [h('span', [h(_icon2['default'], {
                attrs: { type: 'minus' }
            })]), h('span', [h(_icon2['default'], {
                attrs: { type: 'plus' }
            })])]
        );
    }
};

Stepper.install = function (Vue) {
    Vue.component(Stepper.name, Stepper);
};

exports['default'] = Stepper;
module.exports = exports.default;