'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-b7d9268e.js');
const index$1 = require('./index-3ad62856.js');

const baseCss = ":where(*:not(slot),*:not(slot)::before,*:not(slot)::after){-webkit-box-sizing:border-box;box-sizing:border-box}:where(*:not(slot)){margin:0}:where(img,picture,video,canvas,svg){display:block;max-width:100%}:where(input,button,textarea,select){font:inherit}:where(p,h1,h2,h3,h4,h5,h6){overflow-wrap:break-word}:where(a:not([href]):not([class])){color:currentColor;text-decoration:none}:where(a:not([href]):not([class]):hover){color:currentColor;text-decoration:none}:where(ul[role=list],ol[role=list]){list-style:none}:where(table){border-collapse:collapse;border-spacing:0}:where(*:not(slot)){font:var(--pine-typography-body-md-default);letter-spacing:var(--pine-letter-spacing-body-md)}:where(h1,h2,h3,h4,h5,h6){font-family:var(--pine-font-family-heading);color:var(--pine-color-grey-950)}:where(h1){font:var(--pine-typography-heading-h1);letter-spacing:var(--pine-letter-spacing-heading-h1)}:where(h2){font:var(--pine-typography-heading-h2);letter-spacing:var(--pine-letter-spacing-heading-h2)}:where(h3){font:var(--pine-typography-heading-h3);letter-spacing:var(--pine-letter-spacing-heading-h3)}:where(h4){font:var(--pine-typography-heading-h4);letter-spacing:var(--pine-letter-spacing-heading-h4)}:where(h5){font:var(--pine-typography-heading-h5);letter-spacing:var(--pine-letter-spacing-heading-h5)}:where(h6){font:var(--pine-typography-heading-h6);letter-spacing:var(--pine-letter-spacing-heading-h6)}:where(div,label,p,span){color:var(--pine-color-text-default)}:where(code,kbd,pre,samp){font-family:monospace}:where([role=button]){cursor:pointer}:where(:focus){outline:0}:where(:focus-visible){outline:var(--pine-border-width-thick) solid var(--pine-color-purple-500)}:where([hidden]){display:none !important}";
const PdsChipStyle0 = baseCss;

const pdsChipCss = ":host{--box-shadow-focus:0 0 0 1px #ffffff, 0 0 0 3px var(--pine-color-purple-300);--border-radius:var(--pine-border-radius-200);--color-background-accent:var(--pine-color-purple-100);--color-background-accent-dot:var(--pine-color-purple-600);--color-background-accent-hover:var(--pine-color-purple-200);--color-background-danger:var(--pine-color-red-100);--color-background-danger-dot:var(--pine-color-red-600);--color-background-danger-hover:var(--pine-color-red-200);--color-background-info:var(--pine-color-blue-100);--color-background-info-dot:var(--pine-color-blue-600);--color-background-info-hover:var(--pine-color-blue-200);--color-background-neutral:var(--pine-color-grey-100);--color-background-neutral-dot:var(--pine-color-grey-600);--color-background-neutral-hover:var(--pine-color-grey-400);--color-background-success:var(--pine-color-green-100);--color-background-success-dot:var(--pine-color-green-600);--color-background-success-hover:var(--pine-color-green-200);--color-background-warning:var(--pine-color-yellow-100);--color-background-warning-dot:var(--pine-color-yellow-600);--color-background-warning-hover:var(--pine-color-yellow-200);--color-text-accent:var(--pine-color-purple-950);--color-text-danger:var(--pine-color-red-950);--color-text-info:var(--pine-color-blue-950);--color-text-neutral:var(--pine-color-grey-950);--color-text-success:var(--pine-color-green-950);--color-text-warning:var(--pine-color-yellow-950);--font-size-sm:var(--pine-font-size-body-md);--font-size-lg:var(--pine-font-size-heading-h6);--font-weight:var(--pine-font-weight-medium);--spacing-xxs:calc(var(--pine-spacing-050) / 2);--spacing-xs:var(--pine-spacing-050);--spacing-sm:calc(var(--pine-spacing-150) / 2);--spacing-md:var(--pine-spacing-100);--spacing-lg:calc(var(--pine-spacing-250) / 2);--spacing-xl:var(--pine-spacing-150);--spacing-xxl:calc(var(--pine-spacing-350) / 2);--sizing-close:10px;--sizing-close-lg:24px;--sizing-dot:4px;-ms-flex-align:center;align-items:center;border-radius:var(--border-radius);display:-ms-inline-flexbox;display:inline-flex;padding-block:var(--spacing-xs);padding-inline:var(--spacing-lg)}:host(.pds-chip--accent){background:var(--color-background-accent)}:host(.pds-chip--accent) .pds-chip__dot{background:var(--color-background-accent-dot)}:host(.pds-chip--accent) .pds-chip__label,:host(.pds-chip--accent) .pds-chip__button{color:var(--color-text-accent)}:host(.pds-chip--accent) .pds-chip__close:hover{background:var(--color-background-accent-hover)}:host(.pds-chip--accent.pds-chip--dropdown:hover){background:var(--color-background-accent-hover)}:host(.pds-chip--danger){background:var(--color-background-danger)}:host(.pds-chip--danger) .pds-chip__dot{background:var(--color-background-danger-dot)}:host(.pds-chip--danger) .pds-chip__label,:host(.pds-chip--danger) .pds-chip__button{color:var(--color-text-danger)}:host(.pds-chip--danger) .pds-chip__close:hover{background:var(--color-background-danger-hover)}:host(.pds-chip--danger.pds-chip--dropdown:hover){background:var(--color-background-danger-hover)}:host(.pds-chip--info){background:var(--color-background-info)}:host(.pds-chip--info) .pds-chip__dot{background:var(--color-background-info-dot)}:host(.pds-chip--info) .pds-chip__label,:host(.pds-chip--info) .pds-chip__button{color:var(--color-text-info)}:host(.pds-chip--info) .pds-chip__close:hover{background:var(--color-background-info-hover)}:host(.pds-chip--info.pds-chip--dropdown:hover){background:var(--color-background-info-hover)}:host(.pds-chip--neutral){background:var(--color-background-neutral)}:host(.pds-chip--neutral) .pds-chip__dot{background:var(--color-background-neutral-dot)}:host(.pds-chip--neutral) .pds-chip__label,:host(.pds-chip--neutral) .pds-chip__button{color:var(--color-text-neutral)}:host(.pds-chip--neutral) .pds-chip__close:hover{background:var(--color-background-neutral-hover)}:host(.pds-chip--neutral.pds-chip--dropdown:hover){background:var(--color-background-neutral-hover)}:host(.pds-chip--success){background:var(--color-background-success)}:host(.pds-chip--success) .pds-chip__dot{background:var(--color-background-success-dot)}:host(.pds-chip--success) .pds-chip__label,:host(.pds-chip--success) .pds-chip__button{color:var(--color-text-success)}:host(.pds-chip--success) .pds-chip__close:hover{background:var(--color-background-success-hover)}:host(.pds-chip--success.pds-chip--dropdown:hover){background:var(--color-background-success-hover)}:host(.pds-chip--warning){background:var(--color-background-warning)}:host(.pds-chip--warning) .pds-chip__dot{background:var(--color-background-warning-dot)}:host(.pds-chip--warning) .pds-chip__label,:host(.pds-chip--warning) .pds-chip__button{color:var(--color-text-warning)}:host(.pds-chip--warning) .pds-chip__close:hover{background:var(--color-background-warning-hover)}:host(.pds-chip--warning.pds-chip--dropdown:hover){background:var(--color-background-warning-hover)}.pds-chip__dot{border:1px solid transparent;border-radius:50%;display:inline-block;height:var(--sizing-dot);-webkit-margin-after:var(--spacing-xxs);margin-block-end:var(--spacing-xxs);-webkit-margin-end:var(--spacing-xs);margin-inline-end:var(--spacing-xs);width:var(--sizing-dot)}.pds-chip__label{font-size:var(--font-size-sm);font-weight:var(--font-weight)}:host(.pds-chip--dropdown){padding:0}:host(.pds-chip--dropdown) .pds-chip__dot{-webkit-margin-after:calc(var(--spacing-xxs) / 4);margin-block-end:calc(var(--spacing-xxs) / 4);-webkit-margin-before:var(--spacing-xxs);margin-block-start:var(--spacing-xxs)}.pds-chip__button{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:var(--border-radius);display:-ms-flexbox;display:flex;font-weight:var(--font-weight);padding-block:var(--spacing-xs);padding-inline:var(--spacing-lg)}.pds-chip__button:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}.pds-chip__button pds-icon{-webkit-margin-end:calc(var(--spacing-xxs) * -1);margin-inline-end:calc(var(--spacing-xxs) * -1);-webkit-margin-start:var(--spacing-xs);margin-inline-start:var(--spacing-xs)}:host(.pds-chip--tag){padding-block:var(--spacing-xxs)}.pds-chip__close{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:50%;height:var(--sizing-close);-webkit-margin-end:calc(var(--spacing-md) * -1);margin-inline-end:calc(var(--spacing-md) * -1);-webkit-margin-start:var(--spacing-xs);margin-inline-start:var(--spacing-xs);padding:var(--sizing-close);position:relative;width:var(--sizing-close)}.pds-chip__close pds-icon{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.pds-chip__close:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}:host(.pds-chip--large){font-size:var(--font-size-lg);padding-block:var(--spacing-sm);padding-inline:var(--spacing-xxl)}:host(.pds-chip--large):host(.pds-chip--dropdown){padding-block:var(--spacing-xs);padding-inline:var(--spacing-xxs)}:host(.pds-chip--large):host(.pds-chip--dropdown) .pds-chip__dot{-webkit-margin-after:0;margin-block-end:0}:host(.pds-chip--large) .pds-chip__button{font-size:var(--font-size-lg);padding-inline:var(--spacing-xl)}:host(.pds-chip--large) .pds-chip__close{height:var(--sizing-close-lg);-webkit-margin-end:calc(var(--spacing-xl) * -1);margin-inline-end:calc(var(--spacing-xl) * -1);width:var(--sizing-close-lg)}:host(.pds-chip--large):host(.pds-chip--tag){padding-block:var(--spacing-xs)}";
const PdsChipStyle1 = pdsChipCss;

const PdsChip = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.pdsTagCloseClick = index.createEvent(this, "pdsTagCloseClick", 7);
        this.handleCloseClick = () => {
            this.pdsTagCloseClick.emit();
        };
        this.componentId = undefined;
        this.dot = false;
        this.label = undefined;
        this.large = false;
        this.sentiment = 'neutral';
        this.variant = 'text';
    }
    classNames() {
        const classNames = ['pds-chip'];
        if (this.large) {
            classNames.push('pds-chip--large');
        }
        if (this.variant) {
            classNames.push('pds-chip--' + this.variant);
        }
        if (this.sentiment) {
            classNames.push('pds-chip--' + this.sentiment);
        }
        return classNames.join(' ');
    }
    setChipContent() {
        const isDropdown = this.variant === 'dropdown';
        const chipContent = isDropdown ? (index.h("button", { class: "pds-chip__button", type: "button" }, this.dot && index.h("i", { class: "pds-chip__dot", "aria-hidden": "true" }), this.label, index.h("pds-icon", { icon: index$1.downSmall, size: "12px", "aria-hidden": "true" }))) : (index.h("span", { class: "pds-chip__label" }, this.dot && index.h("i", { class: "pds-chip__dot", "aria-hidden": "true" }), this.label));
        return chipContent;
    }
    render() {
        return (index.h(index.Host, { key: 'fac4e9beb31ba05d0c959fb53a9cd62caeacb219', class: this.classNames(), id: this.componentId }, this.setChipContent(), this.variant === 'tag' && (index.h("button", { key: '5f57c1cc76f6cffdebe6244f499b427e5f4c04e8', class: "pds-chip__close", type: "button", onClick: this.handleCloseClick, "aria-label": "Remove" }, index.h("pds-icon", { key: 'f4311271f68d700568dc51af9c1512fdfc7c262d', icon: index$1.remove, size: "12px" })))));
    }
};
PdsChip.style = PdsChipStyle0 + PdsChipStyle1;

exports.pds_chip = PdsChip;

//# sourceMappingURL=pds-chip.cjs.entry.js.map