<%--
/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * The contents of this file are subject to the terms of the Liferay Enterprise
 * Subscription License ("License"). You may not use this file except in
 * compliance with the License. You can obtain a copy of the License by
 * contacting Liferay, Inc. See the License for the specific language governing
 * permissions and limitations under the License, including but not limited to
 * distribution rights of the Software.
 *
 *
 *
 */
--%>

<%@ include file="/init.jsp" %>

<%
String eventName = (String)request.getAttribute(DLVideoWebKeys.EVENT_NAME);
%>

<liferay-util:html-top
	outputKey="document_library_video_css"
>
	<link href="<%= PortalUtil.getStaticResourceURL(request, PortalUtil.getPathProxy() + application.getContextPath() + "/css/main.css") %>" rel="stylesheet" type="text/css" />
</liferay-util:html-top>

<div class="lfr-form-content">
	<clay:sheet>
		<div class="panel-group panel-group-flush">
			<aui:input disabled="<%= true %>" label="video-url" name="dlVideoExternalShortcutURL" wrapperCssClass="mb-0" />

			<p class="form-text"><liferay-ui:message key="video-url-help" /></p>

			<aui:button disabled="<%= true %>" primary="<%= true %>" value="add" />

			<div class="mt-4 video-preview">
				<div class="video-preview-aspect-ratio">
					<div class="video-preview-placeholder">
						<clay:icon
							symbol="video"
						/>
					</div>
				</div>
			</div>

			<liferay-portlet:resourceURL id="/document_library_video/get_dl_video_external_shortcut_fields" portletName="<%= DLVideoPortletKeys.DL_VIDEO %>" var="getDLVideoExternalShortcutFieldsURL" />

			<react:component
				module="js/DLVideoExternalShortcutURLItemSelectorView"
				props='<%=
					HashMapBuilder.<String, Object>put(
						"eventName", eventName
					).put(
						"getDLVideoExternalShortcutFieldsURL", getDLVideoExternalShortcutFieldsURL
					).put(
						"namespace", PortalUtil.getPortletNamespace(DLVideoPortletKeys.DL_VIDEO)
					).put(
						"returnType", VideoEmbeddableHTMLItemSelectorReturnType.class.getName()
					).build()
				%>'
			/>
		</div>
	</clay:sheet>
</div>