<script setup>
import { computed } from "vue";
const props = defineProps({
  date: { type: [String, Date], default: () => /* @__PURE__ */ new Date() },
  format: { type: String, default: () => null }
});
const bindAttrs = computed(() => {
  const attrs = {
    day: "numeric",
    month: "short",
    relative: props.format === "relative" || void 0,
    year: "numeric"
  };
  if (props.format !== "short") {
    attrs["hour"] = "numeric";
    attrs["minute"] = "numeric";
  }
  return attrs;
});
</script>

<template>
  <NuxtTime :datetime="props.date" class="small" v-bind="bindAttrs" />
</template>
