interface CropGuideProps {
  error: string | null;
}

export function CropGuide({ error }: CropGuideProps) {
  return (
    <div className="card-agriculture p-5 md:p-6">
      <h3 className="text-lg font-black text-card-foreground">录入规则</h3>
      <ul className="mt-4 grid gap-3 text-sm leading-6 text-muted-foreground">
        <li className="rounded-2xl bg-muted px-4 py-3">作物名称建议使用标准英文名或平台统一编码。</li>
        <li className="rounded-2xl bg-muted px-4 py-3">同一作物后续会关联 Program、Trial、Study。</li>
        <li className="rounded-2xl bg-muted px-4 py-3">保存后会立即刷新右侧列表，确认接口已经写入。</li>
      </ul>
      {error ? <div className="mt-4 rounded-2xl border border-destructive/20 bg-destructive/10 px-4 py-3 text-sm font-bold text-destructive">{error}</div> : null}
    </div>
  );
}
