<?php
/**@var \Magetop\Advancepreview\Block\Adminhtml\Product\Edit\Form $block */
$previewId = $block->getRequest()->getParam('preview_id',0);
$productId = $block->getRequest()->getParam('product_id',0);
$previewData = $block->getPreviewById($previewId, $productId);
?>

<form action="/" method="post" id="preview-product-form" enctype="multipart/form-data">
    <input type="hidden" name="form_key" value="<?php echo $block->getFormKey(); ?>">
    <input type="hidden" name="product_id" value="<?php echo $productId; ?>">
    <input type="hidden" name="threed_id" value="<?php echo $previewData['threed_id']; ?>">
    <input type="hidden" name="folder_preview" value="<?php echo $previewData['folder_preview']; ?>">

    <label for="txt-preview-title"><?php echo __('3D model title') ?></label>
    <input type="text" id="txt-preview-title" name="title" value="<?php echo $previewData['title']; ?>" placeholder="<?php echo __('3D model title') ?>" class="admin__control-text">

    <label for="txt-preview-is-default"><?php echo __('Is Default') ?></label>
    <select class="admin__control-select" id="txt-preview-is-default" name="is_default" >
        <option value="2"><?php echo __('No') ?></option>
        <option value="1" <?php echo $previewData['is_default'] == 1 ? 'selected="selected"' : ''; ?>><?php echo __('Yes') ?></option>
    </select>
   <!-- <label for="txt-preview-file-name"><?php /*echo __('Model File Name') */?></label>
    <input type="text" id="txt-preview-file-name" name="file_preview" value="<?php /*echo $previewData['file_preview']; */?>" placeholder="<?php /*echo __('Model File Name') */?>" class="admin__control-text">
-->
    <?php /*<label for="txt-preview-light"><?php echo __('Model Light') ?></label>
    <input type="text" id="txt-preview-light" name="preview_light" value="<?php echo $previewData['preview_light']; ?>" placeholder="<?php echo __('Model Light') ?>" class="admin__control-text">

    <label for="txt-preview-zoom"><?php echo __('Model Zoom') ?></label>
    <input type="text" id="txt-preview-zoom" name="preview_zoom" value="<?php echo $previewData['preview_zoom']; ?>" placeholder="<?php echo __('Model Zoom') ?>" class="admin__control-text">

    <label for="txt-preview-position"><?php echo __('Position') ?></label>
    <input type="text" id="txt-preview-zoom" name="position" value="<?php echo $previewData['position']; ?>" placeholder="<?php echo __('Position') ?>" class="admin__control-text">
    */ ?>
    <label for="txt-product-preview"><?php echo __('3D model') ?></label>
    <input type="file" id="txt-product-preview" name="preview_media">

    <label for="txt-product-thumbnail"><?php echo __('Thumbnail') ?></label>
    <input type="file" id="txt-product-thumbnail" name="thumbnail">

    <button type="button" id="btn-save-preview"><?php echo __('Save') ?></button>
    <button type="button" id="btn-close-preview"><?php echo __('Close') ?></button>
</form>
