<template>
    <component v-if="!asChild" :is="as" :class="cx('root')" v-bind="attrs" />
    <slot v-else :a11yAttrs="a11yAttrs" :class="cx('root')" />
</template>

<script>
import { mergeProps } from 'vue';
import BaseInputColorSwatchBackground from './BaseInputColorSwatchBackground.vue';

export default {
    name: 'InputColorSwatchBackground',
    extends: BaseInputColorSwatchBackground,
    inheritAttrs: false,
    computed: {
        attrs() {
            return mergeProps(this.a11yAttrs, this.ptmi('root'));
        },
        a11yAttrs() {
            return {
                'aria-hidden': 'true'
            };
        }
    }
};
</script>
