import { CookieStorage } from '@dvn/kimlik/storage/cookie';
import { Component, h, Host, Prop } from '@stencil/core';
import services from '../../../configs/services';
import { DamgaApi } from '../api/damga-api';
export class DevingenProductRootDamga {
  componentWillLoad() {
    const jwt = new CookieStorage().getAll().jwt;
    const headers = {
      Authorization: jwt ? `Bearer ${new CookieStorage().getAll().jwt}` : undefined,
    };
    this.apiDamga = new DamgaApi(`${services.damga}/${services.base}`, headers);
  }
  render() {
    const { apiDamga, apiData, product, products, workspaceOwnerships } = this;
    return (h(Host, null,
      h("devingen-product-damga-domains", { apiDamga: apiDamga, apiData: apiData, product: product, products: products, workspaceOwnerships: workspaceOwnerships })));
  }
  static get is() { return "devingen-product-root-damga"; }
  static get encapsulation() { return "scoped"; }
  static get properties() { return {
    "apiData": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "DataApi",
        "resolved": "DataApi",
        "references": {
          "DataApi": {
            "location": "import",
            "path": "@dvn/core/api"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    },
    "product": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "Product",
        "resolved": "Product",
        "references": {
          "Product": {
            "location": "import",
            "path": "../../../models/product"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    },
    "products": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "Product[]",
        "resolved": "Product[]",
        "references": {
          "Product": {
            "location": "import",
            "path": "../../../models/product"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    },
    "workspaceOwnerships": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "WorkspaceOwnership[]",
        "resolved": "WorkspaceOwnership[]",
        "references": {
          "WorkspaceOwnership": {
            "location": "import",
            "path": "../../../models/workspace-ownership"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    }
  }; }
}
