{
	"name": "form/nc/nc-document/nc-document.json",
	"layout": {
		"component": "nc-form",
		"attribute": {
			"id": "nc-document"
		},
		"element": [
			{
				"component": "nc-row",
				"element": [
					{
						"component": "nc-col",
						"attribute": {
							"width": "3/10"
						},
						"element": [
							{
								"component": "nc-header",
								"attribute": {
									"size": "medium"
								},
								"element": [
									{
										"component": "nc-translate",
										"text": "Documents",
										"attribute": {
											"model": "hdr.header"
										}
									}
								]
							}
						]
					},
					{
						"component": "nc-col",
						"attribute": {
							"class": ["nc-center-h"],
							"width": "4/10"
						},
						"element": [
							{
								"component": "div",
								"text": "{{ rec.document_name }}"
							}
						]
					},
					{
						"component": "nc-col",
						"attribute": {
							"class": ["nc-end-h"],
							"v-show": "rec.viewer_show_type === 'fullpage'",
							"width": "auto"
						},
						"element": [
							{
								"component": "nc-button",
								"attribute": {
									"style": ["width: 8em"],
									"v-on:click": "fullScreen"
								},
								"element": [
									{
										"component": "nc-icon",
										"attribute": {
											"icon": "arrows-alt"
										}
									},
									{
										"component": "nc-translate",
										"text": "Fullscreen",
										"attribute": {
											"model": "hdr.fullscreen"
										}
									}
								]
							},
							{
								"component": "nc-button",
								"attribute": {
									"class": ["nc-end-h"],
									"primary": "primary",
									"style": ["width: 8em"],
									"v-on:click": "closeFullpage"
								},
								"element": [
									{
										"component": "nc-icon",
										"attribute": {
											"icon": "times"
										}
									},
									{
										"component": "nc-translate",
										"text": "Close",
										"attribute": {
											"model": "hdr.close"
										}
									}
								]
							}
						]
					}
				]
			},
			{
				"component": "nc-row",
				"attribute": {
					"v-show": "rec.viewer_show_type !== 'fullpage'"
				},
				"element": [
					{
						"component": "nc-col",
						"attribute": {
							"width": "3/20"
						},
						"element": [
							{
								"component": "nc-label",
								"text": "Product",
								"attribute": {
									"model": "hdr.product_id"
								}
							}
						]
					},
					{
						"component": "nc-col",
						"attribute": {
							"class": ["nc-padding-right"],
							"width": "4/20"
						},
						"element": [
							{
								"component": "nc-input",
								"attribute": {
									"model": "rec.product"
								}
							}
						]
					},
					{
						"component": "nc-col",
						"attribute": {
							"width": "3/20"
						},
						"element": [
							{
								"component": "nc-label",
								"text": "Name",
								"attribute": {
									"model": "hdr.product_name"
								}
							}
						]
					},
					{
						"component": "nc-col",
						"attribute": {
							"class": ["nc-padding-right"],
							"width": "auto"
						},
						"element": [
							{
								"component": "nc-input",
								"attribute": {
									"disabled": "disabled",
									"model": "rec.product_name"
								}
							}
						]
					},
					{
						"component": "nc-col",
						"attribute": {
							"class": ["nc-end-h"],
							"width": "auto"
						},
						"element": [
							{
								"component": "nc-col",
								"attribute": {
									"class": ["nc-end-h"],
									"width": "auto"
								},
								"element": [
									{
										"component": "nc-button",
										"attribute": {
											"style": ["width: 8em"],
											":disabled": "selectedDocType !== 'pdf'",
											"v-on:click": "documentRowClicked('fullpage')"
										},
										"element": [
											{
												"component": "nc-translate",
												"text": "Viewer...",
												"attribute": {
													"model": "hdr.open_viewer"
												}
											}
										]
									}
								]
							},
							{
								"component": "nc-col",
								"attribute": {
									"class": ["nc-end-h"],
									"width": "auto"
								},
								"element": [
									{
										"component": "nc-button",
										"attribute": {
											"name": "doc_print",
											"primary": "primary",
											"style": ["width: 8em"],
											"v-on:click": "find"
										},
										"element": [
											{
												"component": "nc-translate",
												"text": "Find",
												"attribute": {
													"model": "hdr.find"
												}
											}
										]
									}
								]
							}
						]
					},
					{
						"component": "nc-row",
						"attribute": {
							"class": ["nc-padding-bottom"]
						},
						"element": [
							{
								"component": "nc-grid",
								"attribute": {
									"id": "document",
									"model": "grid.document",
									"style": ["width: 100%", "height: 18.3em"],
									"v-on:grid-row-clicked": "documentRowClicked('preview')"
								}
							}
						]
					},
					{
						"component": "nc-row",
						"attribute": {
							"v-show": "rec.viewer_show_type === 'preview'"
						},
						"element": [
							{
								"component": "nc-document-preview",
								"attribute": {
									"id": "nc-document-preview-canvas",
									":passwordCallback": "passwordCallback",
									":src": "rec.document_data",
									":name": "rec.document_name",
									":style": "rec.document_style"
								}
							}
						]
					}
				]
			},
			{
				"component": "nc-row",
				"attribute": {
					"v-if": "rec.viewer_show_type === 'fullpage' || rec.viewer_show_type === 'preview-full'"
				},
				"element": [
					{
						"component": "nc-pdf-viewer",
						"attribute": {
							":passwordCallback": "passwordCallback",
							":src": "rec.document_data",
							":name": "rec.document_name",
							"style": ["width: 100%", "height: calc(100vh - 8em)"]
						}
					}
				]
			}
		]
	}
}
