import { Host, h } from "@stencil/core";
const TEXT_EL_PART = 'text-element';
export class CpslText {
    constructor() {
        this.getContent = () => {
            switch (this.variant) {
                case 'headingXS': {
                    return (h("h6", { part: TEXT_EL_PART }, h("slot", null)));
                }
                case 'headingS': {
                    return (h("h5", { part: TEXT_EL_PART }, h("slot", null)));
                }
                case 'headingM': {
                    return (h("h4", { part: TEXT_EL_PART }, h("slot", null)));
                }
                case 'headingL': {
                    return (h("h3", { part: TEXT_EL_PART }, h("slot", null)));
                }
                case 'headingXL': {
                    return (h("h2", { part: TEXT_EL_PART }, h("slot", null)));
                }
                case 'heading2XL': {
                    return (h("h1", { part: TEXT_EL_PART }, h("slot", null)));
                }
                default: {
                    return (h("p", { part: TEXT_EL_PART }, h("slot", null)));
                }
            }
        };
        this.color = 'primary';
        this.variant = 'bodyM';
        this.weight = 'regular';
        this.align = undefined;
    }
    render() {
        return (h(Host, { key: '893cf52df1fa3f8304e8fc61e92ad31abeafec91', class: {
                // COLORS
                'primary': this.color === 'primary',
                'secondary': this.color === 'secondary',
                'tertiary': this.color === 'tertiary',
                'subtle': this.color === 'subtle',
                'inverted': this.color === 'inverted',
                'error': this.color === 'error',
                'contrast': this.color === 'contrast',
                'success': this.color === 'success',
                // WEIGHTS
                'medium': this.weight === 'medium',
                'semi-bold': this.weight === 'semiBold',
                'bold': this.weight === 'bold',
                // SIZES
                'body-2xs': this.variant === 'body2XS',
                'body-xs': this.variant === 'bodyXS',
                'body-s': this.variant === 'bodyS',
                'body-m': this.variant === 'bodyM',
                'body-l': this.variant === 'bodyL',
                'body-xl': this.variant === 'bodyXL',
                'heading-xs': this.variant === 'headingXS',
                'heading-s': this.variant === 'headingS',
                'heading-m': this.variant === 'headingM',
                'heading-l': this.variant === 'headingL',
                'heading-xl': this.variant === 'headingXL',
                'heading-2xl': this.variant === 'heading2XL',
                'align-left': this.align === 'left',
                'align-center': this.align === 'center',
                'align-right': this.align === 'right',
            } }, this.getContent()));
    }
    static get is() { return "cpsl-text"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["cpsl-text.scss"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["cpsl-text.css"]
        };
    }
    static get properties() {
        return {
            "color": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "'primary' | 'secondary' | 'tertiary' | 'subtle' | 'inverted' | 'error' | 'contrast' | 'success'",
                    "resolved": "\"contrast\" | \"error\" | \"inverted\" | \"primary\" | \"secondary\" | \"subtle\" | \"success\" | \"tertiary\"",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "The color of text.\nOptions are: `\"primary\"`, `\"secondary\", `\"tertiary\", `\"subtle\", `\"inverted\", `\"error\".\nDefault is: `\"primary\"`."
                },
                "attribute": "color",
                "reflect": false,
                "defaultValue": "'primary'"
            },
            "variant": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "'body2XS' | 'bodyXS' | 'bodyS' | 'bodyM' | 'bodyL' | 'bodyXL' | 'headingXS' | 'headingS' | 'headingM' | 'headingL' | 'headingXL' | 'heading2XL'",
                    "resolved": "\"body2XS\" | \"bodyL\" | \"bodyM\" | \"bodyS\" | \"bodyXL\" | \"bodyXS\" | \"heading2XL\" | \"headingL\" | \"headingM\" | \"headingS\" | \"headingXL\" | \"headingXS\"",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "The variant of text.\nOptions are: `\"body2XS\"`, `\"bodyXS\", `\"bodyS\", `\"bodyM\", `\"bodyL\", `\"bodyXL\", `\"headingXS\", `\"headingS\", `\"headingM\", `\"headingL\", `\"headingXL\", `\"heading2XL\".\nDefault is: `\"bodyM\"`."
                },
                "attribute": "variant",
                "reflect": false,
                "defaultValue": "'bodyM'"
            },
            "weight": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "'regular' | 'medium' | 'semiBold' | 'bold'",
                    "resolved": "\"bold\" | \"medium\" | \"regular\" | \"semiBold\"",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "The weight of text.\nOptions are: `\"regular\"`, `\"medium\", `\"semiBold\", `\"bold\".\nDefault is: `\"regular\"`."
                },
                "attribute": "weight",
                "reflect": false,
                "defaultValue": "'regular'"
            },
            "align": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "'left' | 'center' | 'right'",
                    "resolved": "\"center\" | \"left\" | \"right\"",
                    "references": {}
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "The text-align CSS property to apply.\nOptions are: `\"left\"`, `\"center\", `\"right\".\nDefault is: `\"left\"`."
                },
                "attribute": "align",
                "reflect": false
            }
        };
    }
}
//# sourceMappingURL=cpsl-text.js.map
