<script>
import BaseComponent from '@primevue/core/basecomponent';
import ButtonStyle from 'primevue/button/style';

export default {
    name: 'BaseButton',
    extends: BaseComponent,
    props: {
        /**
         * @deprecated since v5.0.0. Use the default slot instead.
         */
        label: {
            type: String,
            default: null
        },
        /**
         * @deprecated since v5.0.0. Use the default slot instead.
         */
        icon: {
            type: String,
            default: null
        },
        /**
         * @deprecated since v5.0.0. Express icon position via slot order in the default slot.
         */
        iconPos: {
            type: String,
            default: 'left'
        },
        /**
         * @deprecated since v5.0.0. Use the default slot instead.
         */
        iconClass: {
            type: [String, Object],
            default: null
        },
        /**
         * @deprecated since v5.0.0. Compose a Badge inside the default slot instead.
         */
        badge: {
            type: String,
            default: null
        },
        /**
         * @deprecated since v5.0.0. Compose a Badge inside the default slot instead.
         */
        badgeClass: {
            type: [String, Object],
            default: null
        },
        /**
         * @deprecated since v5.0.0. Compose a Badge inside the default slot instead.
         */
        badgeSeverity: {
            type: String,
            default: 'secondary'
        },
        /**
         * @deprecated since v5.0.0. Render your own spinner inside the default slot and toggle disabled.
         */
        loading: {
            type: Boolean,
            default: false
        },
        /**
         * @deprecated since v5.0.0. Render your own spinner inside the default slot and toggle disabled.
         */
        loadingIcon: {
            type: String,
            default: undefined
        },
        iconOnly: {
            type: Boolean,
            default: false
        },
        as: {
            type: [String, Object],
            default: 'BUTTON'
        },
        asChild: {
            type: Boolean,
            default: false
        },
        link: {
            type: Boolean,
            default: false
        },
        severity: {
            type: String,
            default: null
        },
        raised: {
            type: Boolean,
            default: false
        },
        rounded: {
            type: Boolean,
            default: false
        },
        text: {
            type: Boolean,
            default: false
        },
        outlined: {
            type: Boolean,
            default: false
        },
        size: {
            type: String,
            default: null
        },
        variant: {
            type: String,
            default: null
        },
        fluid: {
            type: Boolean,
            default: null
        }
    },
    style: ButtonStyle,
    provide() {
        return {
            $pcButton: this,
            $parentInstance: this
        };
    }
};
</script>
