refactor(planner): import shared types in EmptyDayTile instead of re-declaring

Removes local TagItem, SuggestionRecipe, TopSuggestion, Slot interfaces
and imports Suggestion, SlotMap from types.ts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-10 14:13:25 +02:00
parent b0800ca4f3
commit a8a781f1e9

View File

@@ -1,32 +1,7 @@
<script lang="ts"> <script lang="ts">
import { computeReasoningTags } from './reasoningTags'; import { computeReasoningTags } from './reasoningTags';
import { formatDayAbbr } from '$lib/planner/week'; import { formatDayAbbr } from '$lib/planner/week';
import type { Suggestion, SlotMap } from '$lib/planner/types';
interface TagItem {
id?: string;
name?: string;
tagType?: string;
}
interface SuggestionRecipe {
id: string;
name: string;
cookTimeMin?: number;
effort?: string;
tags?: TagItem[];
}
interface TopSuggestion {
recipe: SuggestionRecipe;
scoreDelta: number;
hasConflict: boolean;
}
interface Slot {
id?: string;
slotDate?: string;
recipe?: any | null;
}
let { let {
slotDate, slotDate,
@@ -39,8 +14,8 @@
slotDate: string; slotDate: string;
slotId: string; slotId: string;
isPlanner: boolean; isPlanner: boolean;
slotMap: Record<string, Slot>; slotMap: SlotMap;
topSuggestion?: TopSuggestion; topSuggestion?: Suggestion;
onaddrecipe?: () => void; onaddrecipe?: () => void;
} = $props(); } = $props();