<template>
  <div class="wireframe" :style="wireframeStyle"></div>
</template>

<script setup lang="ts">
import { computed } from 'vue'
import type { PropType } from 'vue'

type BorderStyle = 'solid' | 'dashed' | 'dotted' | 'double' | 'none'

const props = defineProps({
  fill: {
    type: String,
    default: 'rgba(255, 255, 255, 0)'
  },
  borderColor: {
    type: String,
    default: '#409eff'
  },
  borderStyle: {
    type: String as PropType<BorderStyle>,
    default: 'solid'
  },
  borderWidth: {
    type: Number,
    default: 2
  },
  borderRadius: {
    type: Number,
    default: 0
  }
})

const wireframeStyle = computed(() => ({
  backgroundColor: props.fill,
  borderColor: props.borderColor,
  borderStyle: props.borderStyle,
  borderWidth: `${props.borderWidth}px`,
  borderRadius: `${props.borderRadius}px`
}))
</script>

<style scoped>
.wireframe {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
</style>
