"use strict";(self.webpackChunk_esome_dev_ppms=self.webpackChunk_esome_dev_ppms||[]).push([[5277],{25277:(n,t,r)=>{r.r(t);var o,e,a,i,d=r(50493),p=r(16682),c=r(94430),s=r(56765),l=r(28120),g=r(27805),u=r(77675);function v(n,t,r,o,e,a,i){try{var d=n[a](i),p=d.value}catch(n){return void r(n)}d.done?t(p):Promise.resolve(p).then(o,e)}function h(n){return function(){var t=this,r=arguments;return new Promise((function(o,e){var a=n.apply(t,r);function i(n){v(a,o,e,i,d,"next",n)}function d(n){v(a,o,e,i,d,"throw",n)}i(void 0)}))}}function b(n,t){return t||(t=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(t)}}))}var f=class extends((0,l.$)(u.h)(u.B4)){constructor(){super(...arguments),this.appBindings=[]}get context(){return{title:"application bindings",help:"auth/application"}}render(){var n=this.appBindings||[];return(0,c.dy)(o||(o=b(["\n      <div>\n        <h2>Bound Applications</h2>\n        <p page-description>Bound Applications goes here</p>\n      </div>\n\n      <table>\n        <tr>\n          <th>app name</th>\n          <th>Scope</th>\n          <th>status</th>\n        </tr>\n        ","\n      </table>\n      <mwc-button raised @click=",' label="registered applications .."></mwc-button>\n    '])),n.map((n=>(0,c.dy)(e||(e=b(["\n            <tr>\n              <td>\n                <a href=",">","</a>\n                ","\n              </td>\n              <td>","</td>\n              <td>","</td>\n            </tr>\n          "])),"app-binding/".concat(n.id),n.name,n.description,n.scope,n.status))),(n=>(0,u.c4)("applications")))}pageUpdated(n,t,r){var o=this;return h((function*(){o.active&&(o.appBindings=(yield o.fetchAppBindings()).items)}))()}fetchAppBindings(){return h((function*(){var n=yield g.Lp.query({query:(0,p.ZP)(a||(a=b(["\n        query {\n          appBindings {\n            items {\n              id\n              name\n              application {\n                id\n                name\n              }\n              scope\n              status\n            }\n            total\n          }\n        }\n      "])))});if(!n.errors)return n.data.appBindings}))()}};f.styles=[(0,c.iv)(i||(i=b(["\n      :host {\n        background-color: var(--main-section-background-color);\n        padding: var(--padding-wide);\n\n        overflow: auto;\n      }\n      mwc-button {\n        margin-right: 0;\n        float: right;\n      }\n      h2 {\n        margin: var(--title-margin);\n        font: var(--title-font);\n        color: var(--title-text-color);\n      }\n      [page-description] {\n        margin: var(--page-description-margin);\n        font: var(--page-description-font);\n        color: var(--page-description-color);\n      }\n\n      table {\n        width: 100%;\n        margin: var(--margin-wide) 0;\n        border-collapse: collapse;\n      }\n      tr {\n        background-color: var(--tr-background-color);\n      }\n      tr:nth-child(odd) {\n        background-color: var(--tr-background-odd-color);\n      }\n      tr:hover {\n        background-color: var(--tr-background-hover-color);\n      }\n      th {\n        border-top: var(--th-border-top);\n        border-bottom: var(--td-border-bottom);\n        padding: var(--th-padding);\n\n        font: var(--th-font);\n        color: var(--th-color);\n        text-transform: var(--th-text-transform);\n        text-align: left;\n      }\n      td {\n        padding: var(--td-padding);\n        border-bottom: var(--td-border-bottom);\n        font: var(--td-font);\n        color: var(--td-color);\n      }\n      td a {\n        color: var(--primary-color);\n        font: bold 16px var(--theme-font);\n\n        display: block;\n        text-decoration: none;\n      }\n      .text-align-center {\n        text-align: center;\n      }\n      .text-align-right {\n        text-align: right;\n      }\n    "])))],(0,d.gn)([(0,s.Cb)({type:Array}),(0,d.w6)("design:type",Array)],f.prototype,"appBindings",void 0),f=(0,d.gn)([(0,s.Mo)("app-bindings-page")],f)}}]);