1/*
2 * Copyright (c) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15if (!("finalizeConstruction" in ViewPU.prototype)) {
16    Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { });
17}
18const hilog = requireNapi('hilog');
19const abilityManager = requireNapi('app.ability.abilityManager');
20
21export class FullScreenLaunchComponent extends ViewPU {
22    constructor(j, k, l, m = -1, n = undefined, o) {
23        super(j, l, m, o);
24        if (typeof n === "function") {
25            this.paramsGenerator_ = n;
26        }
27        this.content = this.doNothingBuilder;
28        this.context = getContext(this);
29        this.appId = "";
30        this.options = undefined;
31        this.__isShow = new ObservedPropertySimplePU(false, this, "isShow");
32        this.setInitiallyProvidedValue(k);
33        this.finalizeConstruction();
34    }
35    setInitiallyProvidedValue(i) {
36        if (i.content !== undefined) {
37            this.content = i.content;
38        }
39        if (i.context !== undefined) {
40            this.context = i.context;
41        }
42        if (i.appId !== undefined) {
43            this.appId = i.appId;
44        }
45        if (i.options !== undefined) {
46            this.options = i.options;
47        }
48        if (i.isShow !== undefined) {
49            this.isShow = i.isShow;
50        }
51    }
52    updateStateVars(h) {
53    }
54    purgeVariableDependenciesOnElmtId(g) {
55        this.__isShow.purgeDependencyOnElmtId(g);
56    }
57    aboutToBeDeleted() {
58        this.__isShow.aboutToBeDeleted();
59        SubscriberManager.Get().delete(this.id__());
60        this.aboutToBeDeletedInternal();
61    }
62    get isShow() {
63        return this.__isShow.get();
64    }
65    set isShow(f) {
66        this.__isShow.set(f);
67    }
68    doNothingBuilder(e = null) {
69    }
70    initialRender() {
71        this.observeComponentCreation2((b, c) => {
72            Row.create();
73            Row.justifyContent(FlexAlign.Center);
74            Row.onClick(() => {
75                hilog.warn(0x3900, 'FullScreenLaunchComponent', 'Embedded components do not support preview.');
76            });
77        }, Row);
78        this.content.bind(this)();
79        Row.pop();
80    }
81    rerender() {
82        this.updateDirtyElements();
83    }
84}
85
86export default { FullScreenLaunchComponent }