"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var jsx_runtime_1 = require("react/jsx-runtime");
var base_path_1 = __importDefault(require("lib/base-path"));
var icon_1 = require("@cocalc/frontend/components/icon");
var edit_url_1 = __importDefault(require("lib/share/edit-url"));
var A_1 = __importDefault(require("components/misc/A"));
var site_name_1 = __importDefault(require("components/share/site-name"));
var path_1 = require("path");
function Embed(_a) {
    var project_id = _a.project_id, path = _a.path, style = _a.style;
    var src = (0, path_1.join)(base_path_1.default, "projects/".concat(project_id, "/files/").concat(path, "?fullscreen=kiosk"));
    return ((0, jsx_runtime_1.jsxs)("div", __assign({ style: __assign({ padding: "5px", height: "80vh", border: "1px solid #ddd", borderRadius: "5px", boxShadow: "5px 5px 5px #eee", display: "flex", flexDirection: "column" }, style) }, { children: [(0, jsx_runtime_1.jsx)("iframe", { src: src, width: "100%", height: "100%", frameBorder: "0" }), (0, jsx_runtime_1.jsx)("hr", { style: { width: "100%" } }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(icon_1.Icon, { name: "external-link", style: { marginRight: "5px" } }), (0, jsx_runtime_1.jsxs)(A_1.default, __assign({ href: (0, edit_url_1.default)({ type: "collaborator", project_id: project_id, path: path }), external: true }, { children: ["Open ", path, " in ", (0, jsx_runtime_1.jsx)(site_name_1.default, {}), " for more options"] }))] })] })));
}
exports.default = Embed;
//# sourceMappingURL=embed.js.map