<template>
  <v-overlay
    :model-value="isLoading"
    class="loading-overlay"
    persistent
    contained
  >
    <div class="loading-content">
      <v-progress-circular
        indeterminate
        size="48"
        color="primary"
      ></v-progress-circular>
      <div class="loading-message">{{ loadingMessage }}</div>
    </div>
  </v-overlay>
</template>

<script setup>
defineProps({
  isLoading: {
    type: Boolean,
    default: false
  },
  loadingMessage: {
    type: String,
    default: '처리 중...'
  }
})
</script>

<style scoped>
.loading-overlay {
  z-index: 9999;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.loading-message {
  font-size: 14px;
  color: #666;
  text-align: center;
  max-width: 200px;
}
</style>