<template>
    <div v-if="firm.hierarchicalCategories.category" class="mt-1.5">
        <div
            class="border-[3px] border-blue-200 bg-green-300 py-[12px] px-[15px] inline-flex rounded-2xl gap-2.5"
        >
            <span class="text-sm text-white">
                {{ firm.hierarchicalCategories?.category?.name }}
            </span>
        </div>
    </div>
    <div class="flex w-full flex-wrap gap-2.5 mt-1.5">
        <Badge
            v-for="subCategory in firm.hierarchicalCategories.sub_categories"
            :key="`selected_sub_category_${subCategory.id}`"
            color="blue"
        >
            {{ subCategory.name }}
        </Badge>
    </div>
</template>

<script>
import Badge from "@/components/General/Badge";

export default {
    props: {
        firm: {
            type: Object,
            required: true,
        },
    },
    components: {
        Badge,
    },
};
</script>
