<template>
    <NewProjectDialog
        :model-value="modelValue"
        mode="edit"
        :project="project"
        @update:model-value="$emit('update:modelValue', $event)"
        @saved="(appliesFrom) => $emit('saved', appliesFrom)"
    />
</template>

<script setup lang="ts">
import NewProjectDialog from './NewProjectDialog.vue';
import type { Project } from '../../stores/projectsStore';

defineProps<{ modelValue: boolean; project: Project | null }>();
defineEmits<{
    'update:modelValue': [value: boolean];
    saved: [appliesFrom: string | null];
}>();
</script>
