<template>
    <a-select
        :value="value"
        v-bind="$attrs"
        v-on="$listeners"
        :options="langList"
        :placeholder="$t('select.placeholder')"
    />
</template>

<script>
import langUtils from '@/utils/langUtils';
import { formatObj } from '@/utils';

export default {
    props: ['value'],
    model: {
        prop: 'value',
        event: 'change',
    },
    computed: {
        langList() {
            return formatObj(langUtils.langList, { value: 'key', label: 'name', key: 'key' });
        },
    },
};
</script>
