<script setup lang="ts">
import SharedWorkReportSearch from '../../shared/components/search-panel.vue';

defineOptions({ name: 'MonthlyReportSearch' });

defineProps<{
  teamMode?: boolean;
  subordinateOptions?: Array<{ label: string; value: string }>;
  projectOptions?: Api.WorkReport.Project.ProjectReportOwnerProjectOption[];
}>();

const model = defineModel<Api.WorkReport.Monthly.MonthlyReportSearchParams>('model', { required: true });

const emit = defineEmits<{
  (e: 'reset'): void;
  (e: 'search'): void;
}>();
</script>

<template>
  <SharedWorkReportSearch
    v-model:model="model"
    report-type="monthly"
    :team-mode="teamMode"
    :subordinate-options="subordinateOptions"
    :project-options="projectOptions"
    @reset="emit('reset')"
    @search="emit('search')"
  />
</template>
