"use client";
import { useCopyFeedback } from "./shared";
import { buildHighlightUrl } from "@/lib/text-highlight";
import { createPortal } from "react-dom";
import { X, MessageSquare, ExternalLink } from "lucide-react";
import {
Drawer,
DrawerClose,
DrawerContent,
DrawerHeader,
DrawerTitle,
} from "@/components/ui/drawer";
export function ShareModal({
open,
onClose,
selectedText,
isMobile,
}: {
open: boolean;
onClose: () => void;
selectedText: string;
isMobile: boolean;
}) {
const { copied, copy } = useCopyFeedback();
const shareOptions = [
{
key: "feed",
label: "Share to Feed",
icon:
“{selectedText.slice(0, 120)}
{selectedText.length > 120 ? "…" : ""}”
“{selectedText.slice(0, 120)} {selectedText.length > 120 ? "…" : ""}”