import { MobileChatAssistantLabel } from "@code/ui/components/mobile-chat";

import type { AssistantResponseState } from "@/lib/chat/types";

interface AssistantIdentityProps {
  state?: AssistantResponseState;
}

export const AssistantIdentity = ({ state }: AssistantIdentityProps) => (
  <MobileChatAssistantLabel
    state={
      state ? (
        <span className="response-state" data-state={state}>
          <span aria-hidden="true" className="response-state-dots">
            <i />
            <i />
            <i />
          </span>
          {state === "thinking" ? "Thinking" : "Writing"}
        </span>
      ) : undefined
    }
  />
);
