Sindbad~EG File Manager

Current Path : /home/frekansk/www/wp-content/plugins/learnpress/assets/js/dist/blocks/
Upload File :
Current File : /home/frekansk/www/wp-content/plugins/learnpress/assets/js/dist/blocks/course-duration.min.js

(()=>{"use strict";const e=window.React,t=window.wp.i18n,n=window.wp.blockEditor,r=window.wp.components,s=(window.wp.element,s=>{const a=(0,n.useBlockProps)(),{attributes:l,setAttributes:o,context:i}=s,{lpCourseData:c}=i,u=c?.duration||'<div class="course-count-duration"><span class="course-duration">10 Weeks</span></div>';return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n.InspectorControls,null,(0,e.createElement)(r.PanelBody,{title:(0,t.__)("Settings","learnpress")},(0,e.createElement)(r.ToggleControl,{label:(0,t.__)("Show Label","learnpress"),checked:l.showLabel,onChange:e=>{o({showLabel:e})}}),(0,e.createElement)(r.ToggleControl,{label:(0,t.__)("Show Icon","learnpress"),checked:l.showIcon,onChange:e=>{o({showIcon:e})}}))),(0,e.createElement)("div",{...a},(0,e.createElement)("div",{className:"info-meta-item"},(0,e.createElement)("span",{className:"info-meta-left"},s.attributes.showIcon&&(0,e.createElement)("span",{dangerouslySetInnerHTML:{__html:'<i class="lp-icon-clock-o"></i>'}}),s.attributes.showLabel?"Duration:":""),(0,e.createElement)("span",{className:"info-meta-right",dangerouslySetInnerHTML:{__html:u}}))))}),a=e=>null,l=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"learnpress/course-duration","title":"Course Duration","category":"learnpress-course-elements","description":"Show Duration of Course.","textdomain":"learnpress","keywords":["duration","learnpress"],"usesContext":["lpCourseData"],"icon":"clock","ancestor":["learnpress/single-course","learnpress/course-item-template"],"attributes":{"showIcon":{"type":"boolean","default":true},"showLabel":{"type":"boolean","default":true}},"supports":{"align":["wide","full"],"html":false,"typography":{"fontSize":true,"lineHeight":false,"fontWeight":true,"__experimentalFontFamily":false,"__experimentalTextDecoration":false,"__experimentalFontStyle":false,"__experimentalFontWeight":true,"__experimentalLetterSpacing":false,"__experimentalTextTransform":true,"__experimentalDefaultControls":{"fontSize":true}},"color":{"background":false,"text":true,"link":false,"gradients":false,"__experimentalDefaultControls":{"text":true}},"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}}}'),o=window.wp.blocks,i=window.wp.data;let c=null;var u,p,m;u=["learnpress/learnpress//single-lp_course","learnpress/learnpress//single-lp_course-offline"],p=l,m=e=>{(0,o.registerBlockType)(e.name,{...e,edit:s,save:a})},(0,i.subscribe)(()=>{const e={...p},t=(0,i.select)("core/editor")||null;if(!t||"function"!=typeof t.getCurrentPostId||!t.getCurrentPostId())return;const n=t.getCurrentPostId();null!==n&&c!==n&&(c=n,(0,o.getBlockType)(e.name)&&((0,o.unregisterBlockType)(e.name),u.includes(n)?(e.ancestor=null,m(e)):(e.ancestor||(e.ancestor=[]),m(e))))}),(0,o.registerBlockType)(l.name,{...l,edit:s,save:a})})();

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists