'use client';
import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import React from 'react';
import { useLivePreviewContext } from '../../../providers/LivePreview/context.js';
import './index.scss';
const baseClass = 'live-preview-iframe';
export const IFrame = ()=>{
    const { iframeRef, setLoadedURL, url, zoom } = useLivePreviewContext();
    return /*#__PURE__*/ _jsxDEV("iframe", {
        className: baseClass,
        onLoad: ()=>{
            setLoadedURL(url);
        },
        ref: iframeRef,
        src: url,
        style: {
            transform: typeof zoom === 'number' ? `scale(${zoom}) ` : undefined
        },
        title: url
    }, url, false, {
        fileName: "src/elements/LivePreview/IFrame/index.tsx",
        lineNumber: 13,
        columnNumber: 5
    }, this);
};

//# sourceMappingURL=index.js.map