(()=>{"use strict";const e=window.wp.blocks,o=JSON.parse('{"apiVersion":3,"name":"jobus/video-popup","title":"Video Popup (Jobus)","category":"jobus-blocks","icon":"video-alt3","description":"Jobus Video Popup. A block that allows you to add a video popup to your page.","supports":{"html":false,"anchor":true,"align":true},"attributes":{"icon_bg_color":{"type":"string","default":"#FF4646"},"icon_color":{"type":"string","default":"#ffffff"},"videoUrl":{"type":"string","default":"#"},"backgroundImage":{"type":"string","default":"#"}},"textdomain":"jobus","keywords":["jobus","video","popup","block","youtube"],"editorScript":"file:./index.js","editorStyle":"file:./editor.css"}'),t=window.wp.blockEditor,n=window.wp.components,s=window.React,r=window.wp.i18n,a=window.ReactJSXRuntime;(0,e.registerBlockType)(o,{edit:function({attributes:e,setAttributes:o}){const i=(0,t.useBlockProps)({className:"video-post jbs-d-flex jbs-align-items-center jbs-justify-content-center jbs-mb-50",style:{backgroundImage:`url(${e.backgroundImage})`,backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center center"}});return(0,a.jsx)(s.Fragment,{children:(0,a.jsx)("div",{className:"company-details",children:(0,a.jsx)("div",{className:"details-post-data",children:(0,a.jsxs)("div",{...i,children:[(0,a.jsx)("a",{href:e.videoUrl,className:"fancybox rounded-circle video-icon tran3s jbs-text-center","data-fancybox":"",style:{backgroundColor:e.icon_bg_color},children:(0,a.jsx)("i",{className:"bi bi-play-fill",style:{color:e.icon_color}})}),(0,a.jsx)(t.MediaUploadCheck,{children:(0,a.jsx)(t.MediaUpload,{onSelect:e=>o({backgroundImage:e.url}),allowedTypes:["image"],value:e.backgroundImage,render:({open:t})=>(0,a.jsxs)(s.Fragment,{children:[(0,a.jsx)("button",{onClick:t,children:(0,r.__)("Upload Background Image","jobus")}),e.backgroundImage&&(0,a.jsx)("button",{onClick:()=>o({backgroundImage:""}),children:(0,r.__)("Remove Image","jobus")})]})})}),(0,a.jsx)(n.TextControl,{label:(0,r.__)("Video URL","jobus"),value:e.videoUrl,onChange:e=>o({videoUrl:e})})]})})})})},save:function({attributes:e}){const o=t.useBlockProps.save({className:"video-post jbs-d-flex jbs-align-items-center jbs-justify-content-center jbs-mb-50",style:{backgroundImage:`url(${e.backgroundImage})`,backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center center"}});return(0,a.jsx)("div",{...o,children:(0,a.jsx)("a",{href:e.videoUrl,className:"fancybox jbs-rounded-circle video-icon tran3s jbs-text-center",style:{backgroundColor:e.icon_bg_color},children:(0,a.jsx)("i",{className:"bi bi-play-fill",style:{color:e.icon_color}})})})}})})();
//# sourceMappingURL=index.js.map