import { Separator } from "@kobalte/core/separator";

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

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

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

    return (
        <div class="absolute inset-0 p-3 bg-green-50">
            <div class="grid grid-cols-[auto_20px] gap-1 mb-1">
                <p class="text-sm text-neutral-900 font-bold">{data.Name}</p>
                <IconNote size={20} class="text-neutral-500 mt-1" />
            </div>
            <p class="text-xs text-neutral-500">Keywords TODO</p>
            <Separator class="my-2" />
            <p class="text-xs text-neutral-500 line-clamp-2 overflow-hidden">
                {data.Content}
            </p>
        </div>
    );
};
