"use client";

import { useChatStore } from "@/lib/store";

export function PersonSwitcher() {
  const personId = useChatStore((s) => s.personId);
  const switchPerson = useChatStore((s) => s.switchPerson);

  const short = personId.slice(0, 8);

  return (
    <div className="px-4 py-2 border-b border-border flex items-center justify-between">
      <span className="text-text-faint text-[11px] font-mono tracking-tight">
        {short}
      </span>
      <button
        onClick={() => switchPerson()}
        className="text-text-faint hover:text-text text-[11px] transition-colors px-1.5 py-0.5 rounded hover:bg-bg-hover"
      >
        switch identity
      </button>
    </div>
  );
}
