import { PATHS } from '@/shared/constants/paths';
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
import { UserManageAuthItemProps } from '../model/types';

export const UserManageAuthItem = ({
  usrid,
  mid,
  idCL,
  status,
}: UserManageAuthItemProps) => {
  console.log("UserManageAuthItem", usrid, mid, idCL, status);
  const { navigate } = useNavigate();

  const handleClick = () => {
    navigate(PATHS.account.user.loginAuthInfo, {
      state: { mid, usrid, idCL, status }
    });
  };

  return (
    <div className="auth-item" onClick={handleClick}>
      <div className="auth-item-left">
        <span className="auth-name">{usrid}</span>
      </div>
      <span className="ic20 arrow-right"></span>
    </div>
  );
};