Liferay.Loader.define("document-library-video@1.0.47/js/DLVideoExternalShortcutDLFilePicker",["module","exports","require","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","./components/DLVideoExternalShortcutInput","./components/DLVideoExternalShortcutPreview","./utils/hooks"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;i(r("liferay!frontend-js-react-web$prop-types"));var n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=n?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),o=i(r("./components/DLVideoExternalShortcutInput")),a=i(r("./components/DLVideoExternalShortcutPreview")),l=r("./utils/hooks");function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}var d=({dlVideoExternalShortcutHTML:e="",dlVideoExternalShortcutURL:t="",getDLVideoExternalShortcutFieldsURL:r,namespace:u,onFilePickCallback:i})=>{const[d,c]=(0,n.useState)(t),{error:f,fields:s,loading:p}=(0,l.useDLVideoExternalShortcutFields)({getDLVideoExternalShortcutFieldsURL:r,namespace:u,url:d});return(0,n.useEffect)((()=>{s&&window[i](s)}),[s,i]),n.default.createElement(n.default.Fragment,null,n.default.createElement(o.default,{onChange:c,url:d}),n.default.createElement(a.default,{error:f,framed:!0,loading:p,small:!0,videoHTML:s?s.HTML:e}))};t.default=d}}));
//# sourceMappingURL=DLVideoExternalShortcutDLFilePicker.js.map