import { LitElement, css, html, unsafeCSS } from "lit";
import { customElement } from "lit/decorators.js";
import { ConfirmationContentProps } from "../../interaction-service";
import styles from "./styles.css?inline";
import { template } from "./template";

@customElement("import-data-manager-modal")
export class ImportDataManagerModal extends LitElement implements ConfirmationContentProps<undefined, undefined> {
  data: undefined;
  setResult: (result: undefined) => void;
  setIsValid: (isValid: boolean) => void;
  confirm: () => void;
  cancel: () => void;

  render() {
    return html`${template(this)}`;
  }

  static styles = css`
    ${unsafeCSS(styles)}
  `;

  _accept = () => {
    this.confirm();
  };
}
