<script>
    import Vue from 'vue';
    import {Switch} from 'view-design';
    import FunctionComponent from "../../../libs/utils/FunctionComponent";

    const prefixCls = 'ivu-switch';
    const _Switch = Vue.extend({
        name: 'HtBaseSwitch',
        extends: Switch,
        props: {
            bgattributes: {
                type: Boolean,
                default: false
            }
        },
        computed: {
            wrapClasses() {
                return [
                    `${prefixCls}`,
                    `${prefixCls}-${this.type}`,
                    {
                        [`${prefixCls}-checked`]: this.currentValue === this.trueValue,
                        [`${prefixCls}-bgcolors`]: this.bgattributes === this.trueValue,
                        [`${prefixCls}-disabled`]: this.disabled,
                        [`${prefixCls}-${this.size}`]: !!this.size,
                        [`${prefixCls}-loading`]: this.loading,

                    }
                ];
            },
            innerClasses() {
                return `${prefixCls}-inner`;
            }
        },
    });
    export default FunctionComponent(_Switch, 'ht-base-switch', 'i')
</script>

