<script setup lang="ts">
import { getFilename, patterns } from '../pattern';

const props = defineProps(['color', 'cb'])
</script>
<template>
    <template v-for="item in patterns">
        <NuxtImg :src="getFilename(item.name)" class="picker-item" @click="props.cb(item.name)"
            v-if="item.filename" />
        <span class="picker-item list_picker-item--empty" @click="props.cb(item.name)" v-else />
    </template>
</template>