import { Component, h, Host, Prop } from '@stencil/core';
export class DvnImage {
  constructor() {
    this.scale = 'medium';
    this.leaned = false;
    this.leanedVertically = false;
    this.bordered = false;
    this.shape = 'rounded';
  }
  render() {
    const vars = {};
    if (this.size) {
      vars['--height'] = `${this.size}px`;
      vars['--width'] = `${this.size}px`;
      vars['--font-size'] = `${Number(this.size) / 2.4}px`;
      vars['--line-height'] = `${Number(this.size) - 2}px`;
    }
    return (h(Host, { class: {
        [this.scale]: true,
        [this.shape]: true,
        leaned: this.leaned,
        'leaned-vertically': this.leanedVertically,
        bordered: this.bordered,
      }, "data-text": this.text, style: vars }, this.src && h("img", { loading: "lazy", src: this.src })));
  }
  static get is() { return "dvn-image"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["dvn-image.css"]
  }; }
  static get styleUrls() { return {
    "$": ["dvn-image.css"]
  }; }
  static get properties() { return {
    "scale": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "Scale",
        "resolved": "\"large\" | \"medium\" | \"small\" | \"x-small\"",
        "references": {
          "Scale": {
            "location": "import",
            "path": "../../theme"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "scale",
      "reflect": false,
      "defaultValue": "'medium'"
    },
    "leaned": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "leaned",
      "reflect": false,
      "defaultValue": "false"
    },
    "leanedVertically": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "leaned-vertically",
      "reflect": false,
      "defaultValue": "false"
    },
    "bordered": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "bordered",
      "reflect": false,
      "defaultValue": "false"
    },
    "shape": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "ImageShape",
        "resolved": "\"circle\" | \"rounded\"",
        "references": {
          "ImageShape": {
            "location": "import",
            "path": "./models"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "shape",
      "reflect": false,
      "defaultValue": "'rounded'"
    },
    "src": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "src",
      "reflect": false
    },
    "text": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "text",
      "reflect": false
    },
    "size": {
      "type": "number",
      "mutable": false,
      "complexType": {
        "original": "number",
        "resolved": "number",
        "references": {}
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "size",
      "reflect": false
    }
  }; }
}
