/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import { Calendar, CalendarClock, CalendarPlus, X } from 'lucide-react'; import { Button } from '@/components/ui/button'; interface GanttEmptyStateProps { loading: boolean; hasModel: boolean; /** When true, the active model has a spatial hierarchy — enables the CTA. */ canGenerate?: boolean; /** Human-readable extraction error (last parser failure), if any. */ extractionError?: string | null; onClose?: () => void; onGenerate?: () => void; } export function GanttEmptyState({ loading, hasModel, canGenerate, extractionError, onClose, onGenerate, }: GanttEmptyStateProps) { return (
{onClose && ( )}
{!hasModel ? ( <>

Load a model with IfcTasks

Open an IFC file containing IfcTask or IfcWorkSchedule entities to see the construction schedule here.

) : loading ? (

Extracting schedule…

) : extractionError ? ( <>

Schedule extraction failed

{extractionError}
Re-open the model or inspect the browser console for details.

{canGenerate && onGenerate && (
)} ) : ( <>

No schedule found

This model doesn't define any IfcTask, IfcWorkSchedule, or IfcRelSequence entities. The Gantt panel powers itself from those entities and the products they control via IfcRelAssignsToProcess.

{canGenerate && onGenerate && (

Build a schedule by storey, building, or element-Z height slice.

)} )}
); }