"use strict";(self.webpackChunk_aidoop_aidoop_r=self.webpackChunk_aidoop_aidoop_r||[]).push([[5277],{25277:(t,r,o)=>{o.r(r);var a=o(50493),i=o(16682),n=o(94430),e=o(56765),d=o(28120),p=o(27805),c=o(77675);let s=class extends((0,d.$)(c.h)(c.B4)){constructor(){super(...arguments),this.appBindings=[]}get context(){return{title:"application bindings",help:"auth/application"}}render(){var t=this.appBindings||[];return n.dy`
      <div>
        <h2>Bound Applications</h2>
        <p page-description>Bound Applications goes here</p>
      </div>

      <table>
        <tr>
          <th>app name</th>
          <th>Scope</th>
          <th>status</th>
        </tr>
        ${t.map((t=>n.dy`
            <tr>
              <td>
                <a href=${`app-binding/${t.id}`}>${t.name}</a>
                ${t.description}
              </td>
              <td>${t.scope}</td>
              <td>${t.status}</td>
            </tr>
          `))}
      </table>
      <mwc-button raised @click=${t=>(0,c.c4)("applications")} label="registered applications .."></mwc-button>
    `}async pageUpdated(t,r,o){this.active&&(this.appBindings=(await this.fetchAppBindings()).items)}async fetchAppBindings(){const t=await p.Lp.query({query:i.ZP`
        query {
          appBindings {
            items {
              id
              name
              application {
                id
                name
              }
              scope
              status
            }
            total
          }
        }
      `});if(!t.errors)return t.data.appBindings}};s.styles=[n.iv`
      :host {
        background-color: var(--main-section-background-color);
        padding: var(--padding-wide);

        overflow: auto;
      }
      mwc-button {
        margin-right: 0;
        float: right;
      }
      h2 {
        margin: var(--title-margin);
        font: var(--title-font);
        color: var(--title-text-color);
      }
      [page-description] {
        margin: var(--page-description-margin);
        font: var(--page-description-font);
        color: var(--page-description-color);
      }

      table {
        width: 100%;
        margin: var(--margin-wide) 0;
        border-collapse: collapse;
      }
      tr {
        background-color: var(--tr-background-color);
      }
      tr:nth-child(odd) {
        background-color: var(--tr-background-odd-color);
      }
      tr:hover {
        background-color: var(--tr-background-hover-color);
      }
      th {
        border-top: var(--th-border-top);
        border-bottom: var(--td-border-bottom);
        padding: var(--th-padding);

        font: var(--th-font);
        color: var(--th-color);
        text-transform: var(--th-text-transform);
        text-align: left;
      }
      td {
        padding: var(--td-padding);
        border-bottom: var(--td-border-bottom);
        font: var(--td-font);
        color: var(--td-color);
      }
      td a {
        color: var(--primary-color);
        font: bold 16px var(--theme-font);

        display: block;
        text-decoration: none;
      }
      .text-align-center {
        text-align: center;
      }
      .text-align-right {
        text-align: right;
      }
    `],(0,a.gn)([(0,e.Cb)({type:Array}),(0,a.w6)("design:type",Array)],s.prototype,"appBindings",void 0),s=(0,a.gn)([(0,e.Mo)("app-bindings-page")],s)}}]);