/*
* Copyright (c) 2021 Xilinx, Inc.
* 
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 
* associated documentation files (the "Software"), to deal in the Software without restriction, including 
* without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
* copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to 
* the following conditions: 
* 
* The above copyright notice and this permission notice shall be included in all copies or substantial 
* portions of the Software. 
* 
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 
* LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* 
*
*
*/
import { PolymerElement, html } from "../node_modules/@polymer/polymer/polymer-element.js";
import "../node_modules/@polymer/paper-dialog/paper-dialog.js";
import "../node_modules/@polymer/neon-animation/animations/scale-up-animation.js";
import "../node_modules/@polymer/neon-animation/animations/fade-out-animation.js";
import "../node_modules/@polymer/paper-button/paper-button.js";
import './custom_table.js';

class paperDialog extends PolymerElement {
  static get template() {
    return html`
    <style>
        paper-dialog {
            // width:calc(100vw - 432px);
            // left: 300px !important;
            padding: 15px;
        }
        .px-0 {
            padding-left: 0px;
            padding-right:0px;
        }
    </style>
    <paper-dialog entry-animation="scale-up-animation" exit-animation="fade-out-animation">
        <h2 class="px-0">[[head_title]]</h2>
        <custom-table header_name=[[header_name]] row_data=[[row_data]]></custom-table>
        <div class="buttons">
            <paper-button dialog-dismiss>Cancel</paper-button>
            <paper-button dialog-confirm autofocus>Save</paper-button>
        </div>
    </paper-dialog>
    `;
  }

  ready() {
    super.ready();
  }

}

customElements.define('custom-dialog', paperDialog);