import type { FollowUp } from '@ftb/shared';

export function FollowUpActions({ followUps, onAsk }: { followUps: FollowUp[]; onAsk: (prompt: string) => void }) {
  if (followUps.length === 0) return null;

  return (
    <div className="flex flex-wrap gap-2">
      {followUps.map((item) => (
        <button
          key={`${item.type}-${item.label}`}
          type="button"
          onClick={() => {
            if (item.type === 'question') onAsk(item.prompt);
          }}
          className="rounded-full border border-[#dbe3ef] bg-white/70 px-3 py-2 text-[13px] text-[#334155] shadow-sm transition-colors hover:bg-white disabled:cursor-default disabled:opacity-60"
          disabled={item.type !== 'question'}
        >
          {item.label}
        </button>
      ))}
    </div>
  );
}
