<script>
import BaseInput from '@primevue/core/baseinput';
import InputTagsStyle from 'primevue/inputtags/style';

export default {
    name: 'BaseInputTags',
    extends: BaseInput,
    props: {
        typeahead: {
            type: Boolean,
            default: false
        },
        suggestions: {
            type: Array,
            default: null
        },
        optionLabel: null,
        optionDisabled: null,
        optionGroupLabel: null,
        optionGroupChildren: null,
        scrollHeight: {
            type: String,
            default: '14rem'
        },
        placeholder: {
            type: String,
            default: null
        },
        dataKey: {
            type: String,
            default: null
        },
        max: {
            type: Number,
            default: null
        },
        delimiter: {
            type: [String, RegExp],
            default: null
        },
        allowDuplicate: {
            type: Boolean,
            default: false
        },
        addOnBlur: {
            type: Boolean,
            default: false
        },
        addOnPaste: {
            type: Boolean,
            default: false
        },
        addOnTab: {
            type: Boolean,
            default: false
        },
        minLength: {
            type: Number,
            default: 1
        },
        delay: {
            type: Number,
            default: 300
        },
        appendTo: {
            type: [String, Object],
            default: 'body'
        },
        inputId: {
            type: String,
            default: null
        },
        inputStyle: {
            type: Object,
            default: null
        },
        inputClass: {
            type: [String, Object],
            default: null
        },
        inputProps: {
            type: null,
            default: null
        },
        overlayStyle: {
            type: Object,
            default: null
        },
        overlayClass: {
            type: [String, Object],
            default: null
        },
        autoOptionFocus: {
            type: Boolean,
            default: false
        },
        focusOnHover: {
            type: Boolean,
            default: true
        },
        searchMessage: {
            type: String,
            default: null
        },
        emptySearchMessage: {
            type: String,
            default: null
        },
        emptyMessage: {
            type: String,
            default: null
        },
        showEmptyMessage: {
            type: Boolean,
            default: true
        },
        ariaLabel: {
            type: String,
            default: null
        },
        ariaLabelledby: {
            type: String,
            default: null
        }
    },
    style: InputTagsStyle,
    provide() {
        return {
            $pcInputTags: this,
            $parentInstance: this
        };
    }
};
</script>
