import{r as t,h as n}from"./p-38dcedc4.js";import{a as o}from"./p-63e3a721.js";import"./p-c3d35135.js";import"./p-202e7480.js";import"./p-f2660943.js";import"./p-5a5a5c96.js";import"./p-8d47f7b8.js";const l=class{constructor(n){t(this,n)}watchPath(){console.log("path change",this.path),this.modelPath=decodeURIComponent(this.path),this.loadModel()}componentWillLoad(){this.modelPath=decodeURIComponent(this.path),this.loadModel()}async loadModel(){this.model=await as.modelService.getPSAppView(this.modelPath),await this.model.fill(!0)}render(){return this.model?[n("ion-header",{translucent:!0},n("ion-toolbar",null,n("ion-buttons",{slot:"start"},n("ion-back-button",{text:"返回"})),n("ion-title",null,this.model.title),n("ion-buttons",{slot:"end"},n("ion-button",{onClick:()=>o.openDesignView(this.model)},"设计")))),n("ion-content",{fullscreen:!0},n("ion-list",null,n("ion-list-header",null,"基本信息"),n("ion-item",null,n("ion-label",null,"抬头"),n("ion-note",{slot:"end"},this.model.title)),n("ion-item",null,n("ion-label",null,"标题"),n("ion-note",{slot:"end"},this.model.caption)),n("ion-item",null,n("ion-label",null,"标识"),n("ion-note",{slot:"end"},this.model.codeName))),n("ion-list",null,n("ion-list-header",null,"部件"),this.model.getPSControls().map((t=>n("ion-item",null,n("ion-label",null,n("h2",null,t.logicName),n("h3",null,t.name),n("p",null,t.codeName)),n("div",{class:"list-item-actions",slot:"end"},n("ion-button",{onClick:()=>o.openDesignView(t)},"设计")))))))]:null}static get watchers(){return{path:["watchPath"]}}};l.style=":host{display:block}";export{l as app_view_model}