import { IconMapPin } from "@tabler/icons-solidjs";
import type { UserImage } from "../../network";

type Props = {
    item: Extract<UserImage, { type: "location" }>;
};

export const SearchCardLocation = ({ item }: Props) => {
    const { data } = item;

    return (
        <div class="h-full inset-0 p-3 bg-red-50">
            <div class="flex mb-1 items-center gap-1">
                <IconMapPin size={14} class="text-neutral-500" />
                <p class="text-xs text-neutral-500">Location</p>
            </div>
            <p class="text-sm text-neutral-900 font-bold mb-1">
                {data.Name.length > 0 ? data.Name : "Unknown 🐞"}
            </p>
            <p class="text-xs text-neutral-700">Address: {data.Address}</p>
        </div>
    );
};
