import { jsx as _jsx } from "react/jsx-runtime";
import { usePoster } from "@orderly.network/hooks";
import { forwardRef, useImperativeHandle } from "react";
export const Poster = /*#__PURE__*/ forwardRef((props, parentRef)=>{
    const { width, height, className, data, style } = props;
    const { ref, download, toDataURL, copy, toBlob } = usePoster(data, {
        ratio: props.ratio
    });
    useImperativeHandle(parentRef, ()=>({
            download,
            toDataURL,
            toBlob,
            copy
        }));
    return /*#__PURE__*/ _jsx("canvas", {
        ref: ref,
        width: width,
        height: height,
        className: className,
        style: style
    });
});

//# sourceMappingURL=poster.js.map