import { useState } from "react"; import { Plus, Trash2, Layers, X } from "lucide-react"; import type { HumanResourceItem, MaterialItem } from "../lib/api"; interface ResourceSectionInputsProps { humanResources?: HumanResourceItem[]; setHumanResources?: (hrs: HumanResourceItem[]) => void; materials: MaterialItem[]; setMaterials: (mats: MaterialItem[]) => void; } function TagInput({ tags, onChange, placeholder = "افزودن مشخصه...", }: { tags: string[]; onChange: (tags: string[]) => void; placeholder?: string; }) { const [val, setVal] = useState(""); const addTag = () => { const trimmed = val.trim(); if (trimmed && !tags.includes(trimmed)) { onChange([...tags, trimmed]); setVal(""); } }; const removeTag = (index: number) => { onChange(tags.filter((_, i) => i !== index)); }; return (
هیچ مصالح یا تجهیزاتی تعریف نشده است.
) : ( materials.map((m, i) => (