dh_ackergaul
vor 3 Tagen bb80cdf5a6157ca1f3a276e12e9faae9a4739cb7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
import { i, r, x } from './query-assigned-elements-fea1f631.js';
import { BaseMaskElement } from './mask.component.js';
import { e as e$1 } from './custom-element-30fc6381.js';
import { n } from './base.component-813fc7cf.js';
import { i as i$1 } from './query-1c86d710.js';
import { e } from './query-all-828de4b2.js';
import { E as EventHandlerService } from './modal.component-7c440789.js';
import { LocalStorageService } from './local-storage.service.js';
import { StyleHelper } from './style.helper.js';
import { NoticeAccordionItemComponent } from './notice-accordion-item.component.js';
import { NoticeUtils } from './notice-utils.js';
import { o } from './class-map-a0fb5d87.js';
import { NoticeTableRowComponent } from './notice-table-row.component.js';
import { NoticeStorageService } from './notice-storage.service.js';
import { CloudIdService } from './cloud-id.service.js';
import { ManuProgService } from './manu-prog.service.js';
import '@dh-software/furnview-icons';
import './event.handler.model.js';
import './loading.component.js';
import './dimmer.component.js';
import './dot-flashing-loader.component.js';
import './rotating-dots-loader.component.js';
import './key-frame-effect.service.js';
import './card.data.service.js';
import './card-container-definitions.js';
import './card-container-events.js';
import './card-data-service-update-events.js';
import './toolbar.component.js';
import './toggle-toolbar.component.js';
import './image.service.js';
import './svg-icon.component.js';
import './popup.component.js';
import './popup-closer.component.js';
import './hr-item.component.js';
import './hr-list.component.js';
import './hr-theme.model.js';
import './configurator.form.component.js';
import './configurator.form.base.element.component.js';
import './scene-helper.service.js';
import './async.base.component.js';
import './card-container-settings.js';
import './card-container-states.js';
import './card-container-additional-data.js';
import './card-containers-shared-data.js';
import './input.mask.component.js';
import './information.mask.component.js';
import './open-cloud-id.mask.component.js';
import './share-link-per-mail.component.js';
import './request-appointment.component.js';
import './prog-property.model.js';
import './interface.js';
import './reset.mask.component.js';
import './configuration.service.js';
import './step-based.mask.component.js';
import './container-mask.component.js';
import './messageNoCalc.mask.component.js';
import './button.component.js';
import './iwoFurn.mask.component.js';
import './input.component.js';
import './base-input.js';
import './save-dialog.mask.component.js';
import './send-offer-request-mask.component.js';
import './file-upload-mask.component.js';
import './label.component.js';
import './sass.default-1ca9b57f.js';
import './accordion.component.js';
import './accordion-item.component.js';
import './accordion-layer.component.js';
import './slider.component.js';
import './equipment-list.component.js';
import './state-7ee0cf4f.js';
import './confirming-button.component.js';
import './fitting-item.component.js';
import './proptrans-item.component.js';
import './shoppingcart-item.component.js';
import './prog-context.model.js';
import './step-child.component.js';
import './catalog.service.js';
import './clock.controller.js';
import './checkbox.component.js';
 
var css_248z = i`.close-symbol{cursor:pointer;height:100%;position:relative;width:100%}.close-symbol.loading{z-index:999}.close-symbol.loading:after,.close-symbol.loading:before{background:#fff}.close-symbol:after,.close-symbol:before{background:var(--close-symbol-background,#888);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;content:" ";height:1px;margin:0;padding:0;position:absolute;top:50%;width:100%}.close-symbol:after:hover,.close-symbol:before:hover{background:var(--close-symbol-background-hover,#333)}.close-symbol:after{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);transform:rotate(-45deg)}.close-symbol:before{-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);transform:rotate(45deg)}:host(.active) .circle-number-symbol{border:var(--circle-number-symbol-border-active,2px solid #000)}.circle-number-symbol{align-items:center;background:var(--circle-number-symbol-background,var(--primary-color,red));border:var(--circle-number-symbol-border,2px solid #fff);border-radius:50%;box-shadow:var(--circle-number-symbol-box-shadow,1px 2px 5px 0 #000);color:var(--circle-number-symbol-color,var(--primary-text-color,#000));display:flex;height:var(--circle-number-symbol-size,30px);justify-content:center;position:relative;width:var(--circle-number-symbol-size,30px)}.custom-symbol{cursor:pointer;display:flex;left:10px;position:relative}.custom-symbol.up:after{background-image:var(--custom-symbol-image-down,url("/webui/images/minus.svg"));content:"";height:18px}.custom-symbol.down:after{background-image:var(--custom-symbol-image-down,url("/webui/images/plus.svg"));content:"";height:18px}.custom-symbol:after{color:#1e1e1e;margin:auto 0;padding:0 0 2px;pointer-events:none;transform:translateX(-15px);width:18px}.accordion-symbol{cursor:pointer;display:flex;left:10px;position:relative}.accordion-symbol.up:after{content:"-";font-size:xx-large;transform:scaleX(2) translateX(-4px)}.accordion-symbol.down:after{content:"+";font-size:xx-large}.accordion-symbol:after{color:#1e1e1e;margin:auto 0;padding:0 0 2px;pointer-events:none;transform:translateX(-15px);width:18px}.chevron-symbol{cursor:pointer;left:10px;position:relative}.chevron-symbol.up:after{content:"<"}.chevron-symbol.down:after{content:">"}.chevron-symbol:after{color:inherit;font:17px Consolas,monospace;padding:0 0 2px;pointer-events:none;position:absolute;-webkit-transform:rotate(90deg) translateX(-100%);-moz-transform:rotate(90deg) translateX(-100%);-ms-transform:rotate(90deg) translateX(-100%);transform:rotate(90deg) translateX(-100%)}@media (width >= 980px){.only-mobile{display:none!important}}@media (width <= 980px){.only-desktop{display:none!important}}.bold{font-weight:var(--global-font-weight-bold,600)}*{font-family:var(--global-font,Roboto);font-weight:var(--global-font-weight,400);-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.container{display:flex;margin:10px 0}.container.column{flex-direction:column}.container.column.reverse{flex-direction:column-reverse}.container.row{flex-direction:row}.container.row.reverse{flex-direction:row-reverse}.fluid{flex:1}.fluid.space-after{margin-right:55px}.hidden{display:none!important}.mobile-mode-hide,:host(.mobile-mode-hide){display:none!important}.invisible{visibility:hidden!important}.invisible-scroll,:host(.invisible-scroll){margin-right:-22px;overflow:hidden}.invisible-scroll>:first-child,:host(.invisible-scroll)>:first-child{box-sizing:content-box;overflow-x:hidden;overflow-y:scroll;padding-right:22px}.invisible-scroll.bottom,:host(.invisible-scroll.bottom){margin-right:unset;overflow:hidden}.invisible-scroll.bottom>:first-child,:host(.invisible-scroll.bottom)>:first-child{box-sizing:content-box;margin-bottom:-22px;overflow-x:scroll;overflow-y:hidden;padding-bottom:22px;padding-right:unset}:host([disabled]){filter:contrast(.5) grayscale(1);pointer-events:none}*{scrollbar-color:#5c5c5c hsla(0,0%,100%,.004);scrollbar-width:thin}[disabled]{filter:contrast(.5) grayscale(1);pointer-events:none}::-webkit-scrollbar{height:8px;width:8px}::-webkit-scrollbar,::-webkit-scrollbar-corner{background:hsla(0,0%,100%,0)}::-webkit-scrollbar-thumb{background:#5c5c5c;-webkit-border-radius:8px}::-webkit-scrollbar-button,::-webkit-scrollbar-button:horizontal:end:decrement,::-webkit-scrollbar-button:horizontal:end:increment,::-webkit-scrollbar-button:vertical:end:decrement,::-webkit-scrollbar-button:vertical:start:increment{background-color:transparent;border:none;color:transparent}@media (width >= 980px){:host .notice-header{font-size:35px}:host .notice-list{align-items:center}:host .notice-list fv-accordion{display:none}:host .notice-list .notice-list-header{display:block}:host .notice-list .notice-list-content{display:inline-block}:host .notice-footer fv-separator{margin:5px 0 20px}:host .notice-footer .bottom-line .notice-buttons{justify-content:flex-end}:host .notice-footer .bottom-line .notice-buttons fv-button{margin:0 20px}}@media (width <= 980px){:host .notice-header{font-size:16px}:host .notice-list fv-accordion{display:block;overflow:hidden auto}:host .notice-list fv-accordion fv-notice-accordion-item .content-div{display:flex;justify-content:space-evenly;margin:14px}:host .notice-list fv-accordion fv-notice-accordion-item .content-div .title-text{flex:none;margin:0 20px;text-align:end;width:250px}:host .notice-list fv-accordion fv-notice-accordion-item .content-div .title-text:after{content:":"}:host .notice-list fv-accordion fv-notice-accordion-item .content-div .value-text{flex:1}:host .notice-list fv-accordion fv-notice-accordion-item .content-div .value-text span+span:before{content:" | "}:host .notice-list .notice-list-header{display:none}:host .notice-list .notice-list-content{display:none}:host .notice-footer fv-separator{margin:5px 0 15px}:host .notice-footer .bottom-line .notice-buttons{justify-content:space-between}:host .notice-footer .bottom-line .notice-buttons fv-button{margin:0 5px}:host .notice-footer .bottom-line .notice-buttons fv-button::part(button){--button-span-margin:5px;font-size:10px;line-height:1.75}}:host{display:none;line-height:25px}:host ::slotted(div[slot=header]){display:inline-block;width:200px}:host ::slotted(div[slot=content]){display:inline-block;vertical-align:top;white-space:break-spaces;width:200px}:host([active]){display:grid;grid-template-columns:1fr;grid-template-rows:100px 1fr 130px;justify-content:center;position:relative}:host([active]) .notice-header{display:flex;line-height:42px}:host([active]) .notice-header span{margin:auto}:host([active]) .notice-list{display:flex;flex-direction:column;overflow:hidden;width:100%}:host([active]) .notice-list .notice-list-header{border-bottom:1px solid #bfbfbf;padding-bottom:16px;white-space:nowrap}:host([active]) .notice-list .notice-list-header .fixed-header{display:inline-block;width:200px}:host([active]) .notice-list .notice-list-header .fixed-header.item-checkbox{display:inline-flex;justify-content:center;width:50px}:host([active]) .notice-list .notice-list-header .fixed-header.item-model{width:320px}:host([active]) .notice-list .notice-list-header .fixed-header.openPlanningDummyDiv{width:100px}:host([active]) .notice-list .notice-list-content{overflow-y:auto;white-space:nowrap}:host([active]) .notice-list .notice-empty{align-content:center;align-items:center;display:flex;flex-wrap:nowrap;justify-content:center;left:50%;position:absolute;right:50%;top:50%;width:0}:host([active]) .notice-list .notice-empty span{background:#f4f4f4;display:block;margin:auto;padding:5px;position:absolute;width:max-content}:host([active]) .notice-footer{font-size:14px}:host([active]) .notice-footer .text-line{align-items:center;display:flex;justify-content:space-between}:host([active]) .notice-footer .text-line .left-text{align-items:center;display:flex;flex:none}:host([active]) .notice-footer .text-line .left-text img{height:42px;width:42px}:host([active]) .notice-footer .text-line .right-text{font-size:10px;overflow:hidden;white-space:nowrap}:host([active]) .notice-footer .bottom-line{display:flex}:host([active]) .notice-footer .bottom-line .notice-buttons{display:flex;flex:1;flex-wrap:nowrap}:host([active]) .notice-footer .bottom-line .notice-buttons fv-button{z-index:0}:host([active]) table{display:flex;flex:1;flex-flow:column;height:100%;overflow:hidden;width:100%}:host([active]) table thead{border-bottom:1px solid #bfbfbf;display:table;flex:0 0 auto;padding-bottom:16px;table-layout:fixed;width:calc(100% - .9em)}:host([active]) table tr{width:100%}:host([active]) table th{text-align:start}:host([active]) table th:first-child{width:30px}:host([active]) table th:last-child{width:60px}:host([active]) table td{height:inherit;overflow:hidden;text-align:start}:host([active]) table td:first-child{width:30px}:host([active]) table td:last-child{width:60px}:host([active]) table tbody{flex:1 1 auto;overflow-x:hidden;overflow-y:scroll;table-layout:fixed}:host([active]) table tbody>tr{background-color:#f4f4f4;border-bottom:1px solid #bfbfbf;display:table;height:128px;table-layout:fixed;vertical-align:middle;width:100%}:host([active]) table #model-cell,:host([active]) table .model{width:max-content}:host([active]) table .model{height:inherit;vertical-align:middle;white-space:nowrap}:host([active]) table .model>.model-image{display:inline-block;height:inherit;vertical-align:middle}:host([active]) table .model>.model-image>img{height:inherit}:host([active]) table .model>.model-text{display:inline-block;vertical-align:middle}:host([hide-price]) #price-cell{display:none}`;
 
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getProtoOf = Object.getPrototypeOf;
var __reflectGet = Reflect.get;
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result)
    __defProp(target, key, result);
  return result;
};
var __superStaticGet = (obj, member) => __reflectGet(__getProtoOf(obj), member, obj);
var __async = (__this, __arguments, generator) => {
  return new Promise((resolve, reject) => {
    var fulfilled = (value) => {
      try {
        step(generator.next(value));
      } catch (e) {
        reject(e);
      }
    };
    var rejected = (value) => {
      try {
        step(generator.throw(value));
      } catch (e) {
        reject(e);
      }
    };
    var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
    step((generator = generator.apply(__this, __arguments)).next());
  });
};
let NoticeModalComponent = class extends BaseMaskElement {
  constructor() {
    super();
    this.noticeDomItems = [];
    this.mask = "notice-list-modal";
    this.noticeValues = [];
    this.hidePrice = false;
    this.allSelected = false;
    this.noticeCount = 0;
    this.maxNoticeCount = 10;
    this.selectAll = (e, component) => {
      this.allSelected = component.checked;
      this.noticeDomItems.forEach((item) => {
        item.listItem.selected = this.allSelected;
        item.accordionItem.selected = this.allSelected;
      });
      this.requestUpdate();
    };
    LocalStorageService.remove("currentSceneSettings");
    EventHandlerService.register("save-current-scene-settings", (e) => __async(this, null, function* () {
      var _a, _b, _c, _d, _e, _f, _g;
      let loadingModal = null;
      (_a = this.Modal) == null ? void 0 : _a.setLoading(true);
      if ((yield CommunicationMessageService.getPlannedArticles()).length > 0) {
        (_b = this.Modal) == null ? void 0 : _b.setLoading(true);
        const urlParams = new URL(window.location.href);
        const configurationID = urlParams.searchParams.get("a");
        let storageKey = "currentSceneSettings_" + configurationID;
        if (e.onlyCurrent) {
          storageKey = "currentSceneSettings";
          loadingModal = document.querySelector("fv-loading-modal");
          if (loadingModal) {
            loadingModal.show(false, true);
          }
        }
        const noticeData = yield NoticeStorageService.get();
        const currentSceneSettings = NoticeStorageService.has() ? noticeData || [] : LocalStorageService.get(storageKey) || [];
        yield CommunicationInterfaceService.IsAppReady;
        const properties = yield CommunicationMessageService.getCurrentProgProperties({
          manufacturer: window.g_article.manu,
          useRelevant: true
        });
        const cloudID = yield CloudIdService.createCloudId();
        if (cloudID) {
          const mimeType = "image/png";
          const imageData = yield CommunicationMessageService.takeSnap(300, 300, mimeType, 0.9, true);
          const price = yield CommunicationMessageService.getAppConnectionData();
          const plannedArticle = yield CommunicationMessageService.getPlannedArticles();
          const sceneSettings = {
            price: price.totalPrice,
            image: `data:${mimeType};base64,${imageData}`,
            cloudId: cloudID,
            manufacturer: (_c = price.Articles[0]) == null ? void 0 : _c.DH_Manu,
            program: (_d = price.Articles[0]) == null ? void 0 : _d.DH_Prog,
            programName: (_e = plannedArticle[0]) == null ? void 0 : _e.progName,
            manufacturerName: price.Articles[0].Manu,
            properties
          };
          NoticeUtils.currentNoticeItem = Object.assign(sceneSettings);
          currentSceneSettings.push(sceneSettings);
          if (!e.onlyCurrent) {
            if (NoticeStorageService.has()) {
              yield NoticeStorageService.set(sceneSettings);
            }
            this.createItem(sceneSettings);
          }
        }
        if (!NoticeStorageService.has()) {
          for (let i = currentSceneSettings.length - 1; i >= 0; i--) {
            if (!currentSceneSettings[i].cloudId) {
              currentSceneSettings.splice(i, 1);
            }
          }
          if (currentSceneSettings.length > this.maxNoticeCount) {
            currentSceneSettings.splice(0, 1);
          }
          LocalStorageService.update(storageKey, currentSceneSettings);
        }
        this.noticeCount = currentSceneSettings.length;
        if (loadingModal) {
          loadingModal.hide(false, true);
        }
        this.requestUpdate("noticeCount");
      }
      (_f = this.shadowRoot) == null ? void 0 : _f.dispatchEvent(new Event("contentChanged"));
      (_g = this.Modal) == null ? void 0 : _g.setLoading();
    }));
  }
  firstUpdated(_changedProperties) {
    var __superGet = (key) => super[key];
    return __async(this, null, function* () {
      var _a, _b, _c, _d, _e;
      __superGet("firstUpdated").call(this, _changedProperties);
      (_a = this.Modal) == null ? void 0 : _a.setLoading(true);
      (_b = this.shadowRoot) == null ? void 0 : _b.addEventListener("headerChanged", (ev) => {
        var _a2;
        const headers = this.querySelectorAll("[slot='header']");
        const oldHeaders = (_a2 = this.shadowRoot) == null ? void 0 : _a2.querySelectorAll("[slot='header']");
        oldHeaders == null ? void 0 : oldHeaders.forEach((element) => {
          element.remove();
        });
        if (this.priceCell) {
          headers.forEach((element) => {
            var _a3;
            (_a3 = this.priceCell.parentElement) == null ? void 0 : _a3.insertBefore(element, this.priceCell);
          });
        }
      });
      (_c = this.shadowRoot) == null ? void 0 : _c.addEventListener("contentChanged", (ev) => {
        const contents = this.querySelectorAll("[slot='content']");
        if (this.priceCell) {
          contents.forEach((element) => {
            var _a2;
            (_a2 = this.tableBody) == null ? void 0 : _a2.append(element);
          });
        }
      });
      if (this.selectAllCheckboxes) {
        this.selectAllCheckboxes.forEach((selectAllCheckbox) => {
          selectAllCheckbox.onChange = this.selectAll;
        });
      }
      const urlParams = new URL(window.location.href);
      const configurationID = urlParams.searchParams.get("a");
      const noticeData = yield NoticeStorageService.get();
      const currentSceneSettings = NoticeStorageService.has() ? noticeData || [] : LocalStorageService.get("currentSceneSettings_" + configurationID) || [];
      this.noticeDomItems = [];
      NoticeUtils.selectedNoticeItems = this.noticeDomItems;
      currentSceneSettings.reverse().forEach((currentProperties) => {
        this.createItem(currentProperties);
      });
      (_d = this.shadowRoot) == null ? void 0 : _d.dispatchEvent(new Event("contentChanged"));
      this.noticeCount = currentSceneSettings.length;
      this.requestUpdate("noticeCount");
      (_e = this.Modal) == null ? void 0 : _e.setLoading(false);
    });
  }
  updateSelections(isAccordion) {
    for (let i = 0; i < this.noticeDomItems.length; i++) {
      if (isAccordion) {
        this.noticeDomItems[i].listItem.selected = this.noticeDomItems[i].accordionItem.selected;
      } else {
        this.noticeDomItems[i].accordionItem.selected = this.noticeDomItems[i].listItem.selected;
      }
    }
  }
  createAccordionItem(currentProperties, properties) {
    var _a;
    const noticeAccordionItem = new NoticeAccordionItemComponent();
    noticeAccordionItem.selected = this.allSelected;
    noticeAccordionItem.item.selected = this.allSelected;
    noticeAccordionItem.item.price = currentProperties.price;
    noticeAccordionItem.item.properties = NoticeUtils.getPropertyValues(this.noticeValues, properties);
    noticeAccordionItem.item.image = currentProperties.image;
    noticeAccordionItem.item.programName = currentProperties.programName;
    noticeAccordionItem.item.program = currentProperties.program;
    noticeAccordionItem.item.manufacturer = currentProperties.manufacturer;
    noticeAccordionItem.item.id = currentProperties.cloudId;
    noticeAccordionItem.item.rawProperties = Object.assign(properties);
    noticeAccordionItem.addEventListener("open-planning", (e) => {
      this.openPlanning(e.detail);
    });
    noticeAccordionItem.addEventListener("onselectionchange", (e) => {
      this.allSelected = this.noticeDomItems.every((item) => {
        return item.accordionItem.selected;
      });
      this.updateSelections(true);
      this.requestUpdate();
    });
    const propertiesKeys = Object.keys(properties);
    this.noticeValues.forEach((value) => {
      const titleDiv = Object.assign(document.createElement("div"), { className: "title-text" });
      const textDiv = Object.assign(document.createElement("div"), { className: "value-text" });
      value.properties.forEach((v) => {
        const propertyRegex = new RegExp("" + v);
        const propertiesKey = propertiesKeys.find((key) => {
          return propertyRegex.test(key);
        });
        if (propertiesKey) {
          textDiv.append(Object.assign(document.createElement("span"), { textContent: `${properties[propertiesKey].title}: ${properties[propertiesKey].name}` }));
        }
      });
      const contentDiv = Object.assign(document.createElement("div"), { className: "content-div" });
      contentDiv.append(titleDiv, textDiv);
      noticeAccordionItem.append(contentDiv);
      titleDiv.setAttribute("i18n", value.title);
    });
    (_a = this.accordionComponent) == null ? void 0 : _a.append(noticeAccordionItem);
    return noticeAccordionItem;
  }
  createListItem(currentProperties, properties) {
    const noticeItem = new NoticeTableRowComponent();
    noticeItem.selected = this.allSelected;
    noticeItem.item.price = currentProperties.price;
    noticeItem.hidePrice = this.hidePrice;
    noticeItem.item.properties = NoticeUtils.getPropertyValues(this.noticeValues, properties);
    noticeItem.item.image = currentProperties.image;
    noticeItem.item.programName = currentProperties.programName;
    noticeItem.item.program = currentProperties.program;
    noticeItem.item.manufacturer = currentProperties.manufacturer;
    noticeItem.item.id = currentProperties.cloudId;
    noticeItem.slot = "content";
    noticeItem.addEventListener("open-planning", (e) => {
      this.openPlanning(e.detail);
    });
    noticeItem.addEventListener("onselectionchange", (e) => {
      this.allSelected = this.noticeDomItems.every((item) => {
        return item.listItem.selected;
      });
      this.updateSelections(false);
      this.requestUpdate();
    });
    this.append(noticeItem);
    return noticeItem;
  }
  createItem(currentProperties) {
    const properties = NoticeUtils.getProperties(currentProperties);
    const item = {
      accordionItem: this.createAccordionItem(currentProperties, properties),
      listItem: this.createListItem(currentProperties, properties)
    };
    this.noticeDomItems.push(item);
  }
  openPlanning(item) {
    return __async(this, null, function* () {
      const loadingModal = document.querySelector("fv-loading-modal");
      loadingModal == null ? void 0 : loadingModal.show();
      this.hide(true);
      yield ManuProgService.setManuProg(item.manufacturer, item.manufacturer, item.program);
      yield CommunicationMessageService.openCloudId(item.id);
      loadingModal == null ? void 0 : loadingModal.hide(false, true);
    });
  }
  show() {
    var __superGet = (key) => super[key];
    return __async(this, null, function* () {
      var _a;
      this.noticeValues.forEach((value) => {
        const theader = document.createElement("th");
        theader.slot = "header";
        this.append(theader);
        theader.setAttribute("i18n", value.title);
      });
      (_a = this.shadowRoot) == null ? void 0 : _a.dispatchEvent(new Event("headerChanged"));
      __superGet("show").call(this);
    });
  }
  removeNotice() {
    return __async(this, null, function* () {
      var _a, _b;
      const urlParams = new URL(window.location.href);
      const configurationID = urlParams.searchParams.get("a");
      const noticeData = yield NoticeStorageService.get();
      const currentSceneSettings = NoticeStorageService.has() ? noticeData || [] : LocalStorageService.get("currentSceneSettings_" + configurationID) || [];
      for (let i = this.noticeDomItems.length - 1; i >= 0; i--) {
        const item = this.noticeDomItems[i];
        if (item.listItem.selected) {
          const index = currentSceneSettings.findIndex((sceneSetting) => {
            return sceneSetting.cloudId === item.listItem.item.id;
          });
          if (index !== -1) {
            if (NoticeStorageService.has()) {
              yield NoticeStorageService.remove(currentSceneSettings[index].id);
            }
            currentSceneSettings.splice(index, 1);
          }
          (_a = item.listItem.parentElement) == null ? void 0 : _a.removeChild(item.listItem);
          (_b = this.accordionComponent) == null ? void 0 : _b.removeChild(item.accordionItem);
          this.noticeDomItems.splice(i, 1);
        }
      }
      this.noticeCount = currentSceneSettings.length;
      if (!NoticeStorageService.has()) {
        LocalStorageService.update("currentSceneSettings_" + configurationID, currentSceneSettings);
      }
      this.requestUpdate("noticeCount");
    });
  }
  build(content = x``) {
    const noticeEmpty = { "notice-empty": true, hidden: this.noticeCount > 0 };
    const noticeAccordion = { "mobile-accordion": true, hidden: this.noticeCount === 0 };
    return x`
<!--            <fv-loading class="loading"></fv-loading>-->
            <div class="notice-header">
                <span>
                    <span i18n="modal.notice.head-text"></span>
                    ${NoticeStorageService.has() ? x`(<span class="notice-count">${this.noticeCount}</span>)` : x`
(<span class="notice-count">${this.noticeCount}</span>/<span
                        class="max-notice">${this.maxNoticeCount}</span>)
`}
                </span>
            </div>
            <div class="notice-list">
                <fv-checkbox class="select-all only-mobile" i18n="modal.notice.select_all" .checked="${this.allSelected}"></fv-checkbox>
                <fv-accordion style="--open-planning-image: ${StyleHelper.getVar(this, "--open-planning-image") || ""}" class="${o(noticeAccordion)}"></fv-accordion>
                <table class="only-desktop">
                    <thead>
                        <tr>
                            <th>
                                <fv-checkbox class="select-all" .checked="${this.allSelected}"></fv-checkbox>
                            </th>
                            <th i18n="modal.notice.header.model" id="model-cell"></th>
                            <th i18n="modal.notice.header.price" id="price-cell"></th>
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
 
                    </tbody>
                </table>
                <div class="${o(noticeEmpty)}">
                    <span i18n="modal.notice.text.empty"></span>
                </div>
            </div>
            <div class="notice-footer">
                <div class="text-line">
                    <div class="left-text">${StyleHelper.getVar(this, "--open-planning-image") ? x`<img src="${StyleHelper.getVar(this, "--open-planning-image")}">` : x`<i class="icon fv-icon-folder"></i>`}<span i18n="modal.notice.text.left"></span></div>
                    <div class="right-text only-desktop" i18n="modal.notice.text.right"></div>
                    <div class="right-text only-mobile" i18n="modal.notice.header.price"></div>
                </div>
                <fv-separator class="horizontal"></fv-separator>
                <div class="bottom-line">
                    <fv-checkbox class="select-all only-desktop" i18n="modal.notice.select_all" .checked="${this.allSelected}"></fv-checkbox>
                    <div class="notice-buttons">
                        <fv-button part="remove_button" @click="${this.removeNotice}" i18n="modal.notice.remove_button" .disabled="${this.noticeCount === 0}"></fv-button>
                        <fv-button part="submit_button" i18n="modal.notice.submit" .disabled="${this.noticeCount === 0}"></fv-button>
                    </div>
                </div>
            </div>
        `;
  }
};
NoticeModalComponent.styles = [
  __superStaticGet(NoticeModalComponent, "styles") || [],
  i`${r(css_248z)}`
];
__decorateClass([
  n()
], NoticeModalComponent.prototype, "noticeValues", 2);
__decorateClass([
  n({ type: Boolean, attribute: "hide-price", reflect: true })
], NoticeModalComponent.prototype, "hidePrice", 2);
__decorateClass([
  e(".select-all")
], NoticeModalComponent.prototype, "selectAllCheckboxes", 2);
__decorateClass([
  i$1(".mobile-accordion")
], NoticeModalComponent.prototype, "accordionComponent", 2);
__decorateClass([
  i$1("tbody")
], NoticeModalComponent.prototype, "tableBody", 2);
__decorateClass([
  i$1("#price-cell")
], NoticeModalComponent.prototype, "priceCell", 2);
NoticeModalComponent = __decorateClass([
  e$1("fv-notice-list-mask")
], NoticeModalComponent);
 
export { NoticeModalComponent };