<script setup lang="ts">
import { NULL_PRONOUNS_MAXLENGTH } from '~/src/buildPronoun.ts';

const config = useConfig();

const base = ref('');

const path = computed((): string | null => {
    if (!base.value) {
        return null;
    }
    return `:${base.value}`;
});
</script>

<template>
    <PronounsGenerator
        v-if="config.pronouns.enabled && config.pronouns.null && config.pronouns.null.morphemes"
        type="null"
        :path="path"
        disclaimer
    >
        <div class="form-group">
            <label for="nullPronounsBase"><T>pronouns.null.base</T></label>
            <input
                id="nullPronounsBase"
                v-model="base"
                class="form-control"
                :maxlength="NULL_PRONOUNS_MAXLENGTH"
            >
        </div>
    </PronounsGenerator>
</template>
