(()=>{"use strict";var e,o={939(){const e=window.wp.primitives,o=window.ReactJSXRuntime,t=(0,o.jsx)(e.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)(e.Path,{d:"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z"})}),i=window.wp.blocks,n=window.wp.i18n,a=window.wp.blockEditor,l=window.wp.components,r=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"godam/video-thumbnail","title":"GoDAM Video Thumbnail","category":"media","description":"Display GoDAM video thumbnail","keywords":["video","gallery","grid","videos","thumbnail"],"textdomain":"godam","attributes":{"linkToVideo":{"type":"boolean","default":false},"showPlayButton":{"type":"boolean","default":false},"openInNewTab":{"type":"boolean","default":false}},"supports":{"anchor":true,"align":["left","center","right","wide","full"],"spacing":{"margin":true,"padding":true},"alignWide":true,"color":{"background":true,"gradients":true},"dimensions":{"aspectRatio":true,"minHeight":true},"shadow":true,"customClassName":true,"__experimentalBorder":{"color":true,"radius":true,"style":true,"width":true,"__experimentalDefaultControls":{"color":true,"radius":true,"style":true,"width":true}}},"editorScript":["file:./index.js"],"style":["file:./style-index.css"],"editorStyle":["file:./index.css"],"render":"file:./render.php"}'),{name:s}=r;!function(e){if(!e)return;const{metadata:o,settings:t,name:n}=e;(0,i.registerBlockType)({name:n,...o},t)}({name:s,metadata:r,settings:{icon:t,edit:function({attributes:e,setAttributes:t}){const{linkToVideo:i,showPlayButton:r,openInNewTab:s}=e,d=(0,a.useBlockProps)({className:"godam-editor-video-item"});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.InspectorControls,{children:(0,o.jsxs)(l.PanelBody,{title:(0,n.__)("Thumbnail Settings","godam"),children:[(0,o.jsx)(l.ToggleControl,{label:(0,n.__)("Show play button overlay","godam"),checked:r,onChange:e=>t({showPlayButton:e}),help:r?(0,n.__)("Play button will be displayed.","godam"):(0,n.__)("No play button will be displayed.","godam")}),(0,o.jsx)(l.ToggleControl,{label:(0,n.__)("Link to post","godam"),checked:i,onChange:e=>t({linkToVideo:e}),help:i?(0,n.__)("Thumbnail will link to the video page.","godam"):(0,n.__)("Thumbnail will not be linked.","godam")}),i&&(0,o.jsx)(l.ToggleControl,{label:(0,n.__)("Open in new tab","godam"),checked:s,onChange:e=>t({openInNewTab:e}),help:s?(0,n.__)("Link will open in a new tab.","godam"):(0,n.__)("Link will open in the same tab.","godam")})]})}),(0,o.jsx)("div",{...d,children:(0,o.jsxs)("div",{className:"godam-editor-video-thumbnail",children:[(0,o.jsx)("span",{className:"godam-editor-video-label",children:(0,n.__)("GoDAM Video Thumbnail","godam")}),r&&(0,o.jsx)("div",{className:"godam-editor-video-play-button",children:(0,o.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"60",height:"60","aria-hidden":"true",focusable:"false",children:(0,o.jsx)("path",{d:"M8 5v14l11-7z",fill:"currentColor"})})})]})})]})},save:function(){return null},example:{viewportWidth:350}}})}},t={};function i(e){var n=t[e];if(void 0!==n)return n.exports;var a=t[e]={exports:{}};return o[e](a,a.exports,i),a.exports}i.m=o,e=[],i.O=(o,t,n,a)=>{if(!t){var l=1/0;for(u=0;u<e.length;u++){for(var[t,n,a]=e[u],r=!0,s=0;s<t.length;s++)(!1&a||l>=a)&&Object.keys(i.O).every(e=>i.O[e](t[s]))?t.splice(s--,1):(r=!1,a<l&&(l=a));if(r){e.splice(u--,1);var d=n();void 0!==d&&(o=d)}}return o}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[t,n,a]},i.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),(()=>{var e={489:0,362:0};i.O.j=o=>0===e[o];var o=(o,t)=>{var n,a,[l,r,s]=t,d=0;if(l.some(o=>0!==e[o])){for(n in r)i.o(r,n)&&(i.m[n]=r[n]);if(s)var u=s(i)}for(o&&o(t);d<l.length;d++)a=l[d],i.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return i.O(u)},t=globalThis.webpackChunkgodam=globalThis.webpackChunkgodam||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})();var n=i.O(void 0,[362],()=>i(939));n=i.O(n)})();