"use strict";var e=require("@babel/runtime/helpers/defineProperty"),r=require("prop-types"),t=require("./style.css.js"),i=require("react/jsx-runtime");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=n(e);function s(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,i)}return t}function o(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?s(Object(t),!0).forEach((function(r){c.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var u=function(e){var r=e.attributes,n=e.element,c=e.children,s=n.url,u=n.width;return s?i.jsxs("div",o(o({},r),{},{children:[i.jsx("div",{contentEditable:!1,children:i.jsx("div",{className:t.videoContainer,children:i.jsx("iframe",{className:t.player,style:{width:"".concat(u?"".concat(u,"px"):"100%"),height:"".concat(u?"calc(".concat(u,"px/1.77)"):"100%")},src:s,frameBorder:"0",allowFullScreen:!0,title:"video"})})}),c]})):null};u.propTypes={element:r.shape({url:r.string.isRequired,width:r.number.isRequired}).isRequired,attributes:r.shape({}).isRequired,children:r.node.isRequired},module.exports=u;
