import e from"@babel/runtime/helpers/defineProperty";import{shape as r,string as t,number as i,node as n}from"prop-types";import c from"./style.css.js";import{jsxs as o,jsx as l}from"react/jsx-runtime";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 a(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?s(Object(i),!0).forEach((function(t){e(r,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))}))}return r}var p=function(e){var r=e.attributes,t=e.element,i=e.children,n=t.url,s=t.width;return n?o("div",a(a({},r),{},{children:[l("div",{contentEditable:!1,children:l("div",{className:c.videoContainer,children:l("iframe",{className:c.player,style:{width:"".concat(s?"".concat(s,"px"):"100%"),height:"".concat(s?"calc(".concat(s,"px/1.77)"):"100%")},src:n,frameBorder:"0",allowFullScreen:!0,title:"video"})})}),i]})):null};p.propTypes={element:r({url:t.isRequired,width:i.isRequired}).isRequired,attributes:r({}).isRequired,children:n.isRequired};export{p as default};
//# sourceMappingURL=VideoElement.js.map
