(()=>{"use strict";const e=window.wp.blocks,t=window.wp.i18n,o=window.wp.blockEditor,a=window.wp.components,n=window.ReactJSXRuntime,r=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"godam/video-duration","title":"GoDAM Video Duration","category":"media","icon":"clock","description":"Display GoDAM video\'s duration","keywords":["video","gallery","grid","videos"],"textdomain":"godam","attributes":{"durationFormat":{"type":"string","default":"default"}},"supports":{"align":true,"ariaLabel":true,"color":{"background":true,"text":true},"customClassName":true,"shadow":true,"spacing":{"margin":true,"padding":true},"typography":{"fontSize":true,"lineHeight":true,"textAlign":true}},"editorScript":["file:./index.js"],"render":"file:./render.php"}'),{name:i}=r;!function(t){if(!t)return;const{metadata:o,settings:a,name:n}=t;(0,e.registerBlockType)({name:n,...o},a)}({name:i,metadata:r,settings:{edit:function({attributes:e,setAttributes:r}){const{durationFormat:i}=e,d=(0,o.useBlockProps)(),s=[{value:"default",label:(0,t.__)("Default (HH:MM:SS)","godam"),placeholder:(0,t.__)("00:00:00","godam")},{value:"minutes",label:(0,t.__)("Minutes only (MM:SS)","godam"),placeholder:(0,t.__)("00:00","godam")},{value:"seconds",label:(0,t.__)("Total Seconds","godam"),placeholder:(0,t.__)("0s","godam")}];return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.InspectorControls,{children:(0,n.jsx)(a.PanelBody,{title:(0,t.__)("Duration Settings","godam"),children:(0,n.jsx)(a.SelectControl,{label:(0,t.__)("Duration Format","godam"),value:i,options:s,onChange:e=>r({durationFormat:e})})})}),(0,n.jsx)("div",{...d,children:(0,n.jsx)("p",{className:"godam-duration-preview",children:(0,n.jsx)("span",{children:s.find(e=>e.value===i)?.placeholder||(0,t.__)("00:00:00","godam")})})})]})},save:function(){return null},example:{viewportWidth:350}}})})();