import { BoxWithFullScreen } from "~/components"
import { objStore } from "~/store"
import { Icon, hope } from "@hope-ui/solid"
import { convertURL, hoverColor } from "~/utils"
import { Component, createMemo } from "solid-js"
import { useLink } from "~/hooks"
import { TbExternalLink } from "solid-icons/tb"
const IframePreview = (props: { scheme: string }) => {
const { currentObjLink } = useLink()
const iframeSrc = createMemo(() => {
return convertURL(props.scheme, {
raw_url: objStore.raw_url,
name: objStore.obj.name,
d_url: currentObjLink(true),
ts: true,
})
})
return (
{
window.open(iframeSrc(), "_blank")
}}
cursor="pointer"
rounded="$md"
bgColor={hoverColor()}
p="$1"
boxSize="$7"
/>
)
}
export const generateIframePreview = (scheme: string): Component => {
return () => {
return
}
}