"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "Poster", {
    enumerable: true,
    get: function() {
        return Poster;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _hooks = require("@orderly.network/hooks");
const _react = require("react");
const Poster = /*#__PURE__*/ (0, _react.forwardRef)((props, parentRef)=>{
    const { width, height, className, data, style } = props;
    const { ref, download, toDataURL, copy, toBlob } = (0, _hooks.usePoster)(data, {
        ratio: props.ratio
    });
    (0, _react.useImperativeHandle)(parentRef, ()=>({
            download,
            toDataURL,
            toBlob,
            copy
        }));
    return /*#__PURE__*/ (0, _jsxruntime.jsx)("canvas", {
        ref: ref,
        width: width,
        height: height,
        className: className,
        style: style
    });
});

//# sourceMappingURL=poster.js.map