'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
var printView = require('./print-view.js');
var index = require('../../../composables/use-locale/index.js');

const styles = `
  .background {
    width: 100%;
    fill: rgba(255, 255, 255, 1.0);
  }

  .map-image {
    max-width: 95vw;
    max-height: 95vh;
  }

  .layer-legends {
    display: inline;
    float: left;
    padding-left: 20px;
    padding-right: 20px;
  }

  .layer-title {
    font-weight: bold;
  }

  h1, h2, h3 {
    clear: both;
  }
`;
const createPrintView = (options) => {
  const { printWindow = window.open(), closeCallback } = options;
  if (closeCallback) {
    printWindow.addEventListener("unload", () => {
      closeCallback(printWindow);
    });
  }
  printWindow.document.open();
  printWindow.document.close();
  printWindow.document.head.innerHTML = `
    <meta charset="UTF-8">
    <title>${index.t("vc.navigation.print.printViewTitle")}</title>
    <style>${styles}</style>
    `;
  printWindow.document.body.innerHTML = '<div id="print"></div>';
  options.printWindow = options.printWindow || printWindow;
  const printViewProps = {
    options
  };
  const app = vue.createApp(printView["default"], printViewProps);
  app.mount(printWindow.document.getElementById("print"));
};

exports["default"] = createPrintView;
//# sourceMappingURL=createPrintView.js.map
