import { h } from "@stencil/core";
import { States } from "src/utils/utils";
export class SwContentWrapper {
  constructor() {
    this.pluginActions = [];
    this.baseUrl = "cicciobello";
    this.done = false;
    this.sendDateForCalendar = false;
    this.dark = true;
    this.myProperty = undefined;
    this.state = States.create;
    this.deleteMod = false;
    this.textEmitted = undefined;
  }
  componentWillRender() {
    const pluginAction1 = {
      id: "v2/stream/recentchange",
      name: "pluginAction1",
      info: "info",
    };
    const pluginAction2 = {
      id: "v2/stream/recentchange",
      name: "AzionePromemoria",
      info: "info",
    };
    const pluginAction3 = {
      id: "v2/stream  /recentchange",
      name: "pluginAction3",
      info: "info",
    };
    const pluginAction4 = {
      id: "v2/stream/recentchange",
      name: "pluginAction4",
      info: "info",
    };
    const pluginAction5 = {
      id: "v2/stream/recentchange",
      name: "pluginAction5",
      info: "info",
    };
    const pluginAction6 = {
      id: "v2/stream/recentchange",
      name: "pluginAction6",
      info: "info",
    };
    const pluginAction7 = {
      id: "v2/stream/recentchange",
      name: "pluginAction7",
      info: "info",
    };
    const pluginAction8 = {
      id: "v2/stream/recentchange",
      name: "pluginAction8",
      info: "info",
    };
    const pluginAction9 = {
      id: "v2/stream/recentchange",
      name: "pluginAction9",
      info: "info",
    };
    const pluginAction10 = {
      id: "v2/stream/recentchange",
      name: "pluginAction10",
      info: "info",
    };
    const pluginAction11 = {
      id: "v2/stream/recentchange",
      name: "pluginAction11",
      info: "info",
    };
    const pluginAction12 = {
      id: "v2/stream/recentchange",
      name: "pluginAction13",
      info: "info",
    };
    const pluginAction13 = {
      id: "v2/stream/recentchange",
      name: "pluginAction14",
      info: "info",
    };
    const pluginAction14 = {
      id: "v2/stream/recentchange",
      name: "pluginAction15",
      info: "info",
    };
    const pluginAction15 = {
      id: "v2/stream/recentchange",
      name: "pluginAction16",
      info: "info",
    };
    const pluginAction16 = {
      id: "v2/stream/recentchange",
      name: "pluginAction17",
      info: "info",
    };
    const pluginAction17 = {
      id: "v2/stream/recentchange",
      name: "pluginAction18",
      info: "info",
    };
    const pluginAction18 = {
      id: "v2/stream/recentchange",
      name: "pluginAction19",
      info: "info",
    };
    const pluginAction19 = {
      id: "v2/stream/recentchange",
      name: "pluginAction20",
      info: "info",
    };
    const pluginAction20 = {
      id: "v2/stream/recentchange",
      name: "pluginAction21",
      info: "info",
    };
    const pluginAction21 = {
      id: "v2/stream/recentchange",
      name: "pluginAction22",
      info: "info",
    };
    const pluginAction22 = {
      id: "v2/stream/recentchange",
      name: "pluginAction23",
      info: "info",
    };
    const pluginAction23 = {
      id: "v2/stream/recentchange",
      name: "pluginAction24",
      info: "info",
    };
    const pluginAction24 = {
      id: "v2/stream/recentchange",
      name: "pluginAction25",
      info: "info",
    };
    const pluginAction25 = {
      id: "v2/stream/recentchange",
      name: "pluginAction26",
      info: "info",
    };
    const pluginAction26 = {
      id: "v2/stream/recentchange",
      name: "pluginAction27",
      info: "info",
    };
    const pluginAction27 = {
      id: "v2/stream/recentchange",
      name: "pluginAction28",
      info: "info",
    };
    const pluginAction28 = {
      id: "v2/stream/recentchange",
      name: "pluginAction29",
      info: "info",
    };
    const pluginAction29 = {
      id: "v2/stream/recentchange",
      name: "pluginAction30",
      info: "info",
    };
    const pluginAction30 = {
      id: "v2/stream/recentchange",
      name: "pluginAction31",
      info: "info",
    };
    const pluginAction31 = {
      id: "v2/stream/recentchange",
      name: "pluginAction32",
      info: "info",
    };
    const pluginAction32 = {
      id: "v2/stream/recentchange",
      name: "pluginAction33",
      info: "info",
    };
    const pluginAction33 = {
      id: "v2/stream/recentchange",
      name: "pluginAction34",
      info: "info",
    };
    const pluginAction34 = {
      id: "v2/stream/recentchange",
      name: "pluginAction35",
      info: "info",
    };
    // const plugin1 = {id:'1', name:'pippo', pluginActionList:[pluginAction1,pluginAction2,pluginAction3]}
    // const plugin2 = {id:'2', name:'non buono',pluginActionList:[pluginAction4,pluginAction5]}
    // const plugin3 = {id:'3', name:'e vabbè',pluginActionList:[pluginAction6,pluginAction7,pluginAction8]}
    // const plugin4 = {id:'4', name:'proviamo',pluginActionList:[pluginAction9]}
    // const plugin5 = {id:'5', name:'pluto',pluginActionList:[pluginAction10]}
    // const plugin6 = {id:'6', name:'putin',pluginActionList:[pluginAction11]}
    this.pluginActions.push(pluginAction1, pluginAction2, pluginAction3, pluginAction4, pluginAction5, pluginAction6, pluginAction7, pluginAction8, pluginAction9, pluginAction10, pluginAction11, pluginAction12, pluginAction13, pluginAction14, pluginAction15, pluginAction16, pluginAction17, pluginAction18, pluginAction19, pluginAction20, pluginAction21, pluginAction22, pluginAction23, pluginAction24, pluginAction25, pluginAction26, pluginAction27, pluginAction28, pluginAction29, pluginAction30, pluginAction31, pluginAction32, pluginAction33, pluginAction34);
    this.myProperty = {
      name: "cambiato complimenti",
      description: "aaaaa",
      startDate: "2022-07-21T23:15:00",
      endDate: "2022-07-22T03:15:00",
      actionRead: false,
      id: 187,
      idPluginAction: 9,
      sendUpdateNotification: false,
    };
  }
  changeDark() {
    this.deleteMod = !this.deleteMod;
  }
  getTextFromInputText(ev) {
    this.textEmitted = ev.detail;
  }
  submit() {
    if (this.state === States.create) {
      this.state = States.view;
    }
    else {
      this.state = States.create;
    }
  }
  render() {
    return (h("div", { class: "bg-brand-maggioli-05 w-screen h-screen" }, h("div", { class: "wrapp w-[200px]" }, h("sw-input-text-area", { state: this.state, text: this.textEmitted, countWords: true }), this.textEmitted, h("button", { onClick: () => this.submit() }, "Submit")), h("sw-addon-reminder", { doneFlag: this.done, idPluginAction: this.idPlugin, idPluginActionExternal: this.idPluginExternal, reminderInfoDTO: this.myProperty, state: "view" }), h("sw-addon-reminder", { sendDataForCalendar: this.sendDateForCalendar, reminderInfoDTO: this.myProperty, withoutFooter: false })));
  }
  changeAnotherDTO(ev) {
    if (ev) {
      this.done = false;
      this.idPlugin = 70;
      this.idPluginExternal = 777;
      this.myProperty = {
        name: "cambiato complimenti",
        description: "aaaaa",
        startDate: "2022-07-20T01:15:00",
        endDate: "2022-07-20T03:15:00",
        actionRead: false,
        id: 187,
        idPluginAction: 9,
        sendUpdateNotification: false,
      };
    }
  }
  changeDTO(ev) {
    if (ev) {
      this.sendDateForCalendar = true;
      this.done = true;
      this.idPlugin = 69;
      this.idPluginExternal = 666;
      this.baseUrl = "http://federico-derrico.app.dev.synbee.it";
      this.myProperty = {
        name: "proviamo di nuovo",
        description: "aaaaa",
        startDate: "2022-05-20T01:15:00",
        endDate: "2022-05-20T03:15:00",
        actionRead: false,
        id: 187,
        idPluginAction: 9,
        sendUpdateNotification: false,
      };
    }
  }
  static get is() { return "sw-content-wrapper"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() {
    return {
      "$": ["sw-content-wrapper.css"]
    };
  }
  static get styleUrls() {
    return {
      "$": ["sw-content-wrapper.css"]
    };
  }
  static get states() {
    return {
      "myProperty": {},
      "state": {},
      "deleteMod": {},
      "textEmitted": {}
    };
  }
  static get listeners() {
    return [{
        "name": "outputText",
        "method": "getTextFromInputText",
        "target": undefined,
        "capture": false,
        "passive": false
      }];
  }
}
