<!-- SPEC: PJ2026-010405 云端控制台. -->
<!-- Implementation reference: draft-2026-07-13-p0-cloud-console. -->

<script setup lang="ts">
import OverlaySurface from "./OverlaySurface.vue";

const props = withDefaults(defineProps<{
  open: boolean;
  title: string;
  description?: string;
  placement?: "left" | "right";
  closeOnBackdrop?: boolean;
  busy?: boolean;
  surfaceClass?: string;
}>(), {
  description: "",
  placement: "right",
  closeOnBackdrop: true,
  busy: false,
  surfaceClass: ""
});

defineEmits<{ close: [] }>();
</script>

<template>
  <OverlaySurface kind="drawer" :open="open" :title="title" :description="description" :placement="placement" :close-on-backdrop="closeOnBackdrop" :busy="busy" :surface-class="surfaceClass" @close="$emit('close')"><slot /><template v-if="$slots.footer" #footer><slot name="footer" /></template></OverlaySurface>
</template>
