import { Separator } from "@kobalte/core/separator";
import SolidjsMarkdown from "solidjs-markdown";

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="h-full inset-0 p-3 bg-green-50">
            <div class="flex mb-1 items-center gap-1">
                <IconNote size={14} class="text-neutral-500" />
                <p class="text-xs text-neutral-500">Note</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">
                <SolidjsMarkdown>{data.Content}</SolidjsMarkdown>
            </p>
        </div>
    );
};
