(()=>{"use strict";const e=window.React,t=window.wp.blockEditor,n=window.wp.components,a=window.wp.compose,r=window.wp.hooks,i=window.wp.i18n,o=(0,a.createHigherOrderComponent)((a=>r=>{const{name:o}=r,l="core/image"===o||"core/gallery"===o,c=firelight.activeLightbox,s="Firelight Pro Lightbox"===c,m=firelight.isPayingUser,g=firelight.isProUser,h=firelight.settingsUrl,b="1"===firelight.lightboxPanelOpen;return l?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(a,{key:"edit",...r}),(0,e.createElement)(t.InspectorControls,null,(0,e.createElement)(n.PanelBody,{className:"fancybox-settings",title:(0,i.__)("Lightbox"),initialOpen:b},(0,e.createElement)("p",null,(0,i.__)("You are using: "),(0,e.createElement)("span",{className:"fancybox-active-lightbox"},c),"."),!g&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n.ToggleControl,{label:"Use Pro Lightbox?",checked:!1,disabled:!0}),(0,e.createElement)("p",{className:"fancybox-upgrade-notice"},(0,i.__)("Upgrade to enable Pro Lightbox."),(0,e.createElement)("br",null),(0,e.createElement)("strong",null,(0,i.__)(" 20% off with coupon PRO20."))),(0,e.createElement)("div",{className:"fancybox-button-container"},(0,e.createElement)(n.Button,{variant:"primary",className:"fancybox-button",href:"https://firelightwp.com/pro-lightbox/?utm_source=block-editor&utm_medium=referral&utm_campaign=easy-fancybox",target:"_blank"},(0,i.__)("Demos"))," ",(0,e.createElement)(n.Button,{variant:"primary",className:"fancybox-button",href:"https://firelightwp.com/pro-lightbox/pricing/?utm_source=block-editor&utm_medium=referral&utm_campaign=easy-fancybox",target:"_blank"},m?(0,i.__)("Upgrade"):(0,i.__)("Try It Free")))),g&&!s&&(0,e.createElement)("p",null,(0,i.__)("Notice: You have an active Firelight Pro license and can use the Firelight Pro Lightbox!")),(0,e.createElement)("div",{className:"fancybox-settings-link"},(0,e.createElement)(n.Button,{variant:"link",href:h,target:"_blank"},(0,i.__)("View Lightbox Settings")))))):(0,e.createElement)(a,{...r})}),"withLightboxPanelControls");(0,r.addFilter)("editor.BlockEdit","lightpress/lightbox-panel",o)})();