import{r as e,h as o,H as t,g as s}from"./p-4c596c7f.js";import{i as a}from"./p-176c8c73.js";import{B as i}from"./p-33de3866.js";import{d as r}from"./p-522b3f33.js";import{L as n}from"./p-0f725309.js";import{i as c}from"./p-7d75995e.js";import"./p-b9dddc6c.js";import"./p-efcca75f.js";import"./p-c57ee67c.js";import"./p-85125f06.js";const l=class{constructor(o){e(this,o),this.inheritedAttributes={},this.language=r.language,this.region=r.region,this.size="",this.inverted=!1}componentWillRender(){this.inheritedAttributes=a(this.el,["tabindex"])}async configChanged(e){this.language=e.language,this.region=e.region}render(){const e=i.block("close"),s=e.element("button"),a=s.element("icon"),r=c[this.language].close;return o(t,{class:Object.assign({},e.class())},o("button",Object.assign({type:"button","aria-label":r,title:r,class:Object.assign(Object.assign(Object.assign({},s.class()),s.modifier("inverted").class(this.inverted)),s.modifier(`size-${this.size}`).class(""!==this.size)),"data-testid":"bal-close"},this.inheritedAttributes),o("bal-icon",{name:"close",size:"small"===this.size?"x-small":"medium"===this.size?"medium":"small",inverted:this.inverted,class:Object.assign({},a.class())})))}get el(){return s(this)}};(function(e,o,t,s){var a,i=arguments.length,r=i<3?o:null===s?s=Object.getOwnPropertyDescriptor(o,t):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,o,t,s);else for(var n=e.length-1;n>=0;n--)(a=e[n])&&(r=(i<3?a(r):i>3?a(o,t,r):a(o,t))||r);i>3&&r&&Object.defineProperty(o,t,r)})([n()],l.prototype,"configChanged",null),l.style={css:"@media (hover: hover)and (pointer: fine){.bal-close__button--inverted:focus-visible:not(:active),.bal-close__button:focus-visible:not(:active){-webkit-box-shadow:var(--bal-focus-shadow) !important;box-shadow:var(--bal-focus-shadow) !important}}:root{--bal-close-background:var(--bal-color-transparent);--bal-close-background-focus-visible:var(--bal-form-field-control-background);--bal-close-background-focus-inverted-focus-visible:var(--bal-form-field-control-background);--bal-close-border-radius:var(--bal-radius-rounded)}.bal-close{position:static;display:inline-block}.bal-close__button{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-moz-appearance:none;-webkit-appearance:none;background-color:var(--bal-close-background);border:none;border-radius:var(--bal-close-border-radius);cursor:pointer;pointer-events:auto;display:inline-block;-ms-flex-positive:0;flex-grow:0;-ms-flex-negative:0;flex-shrink:0;font-size:0;outline:none;position:relative;vertical-align:top;padding:.313rem}@media (hover: hover)and (pointer: fine){.bal-close__button:hover{background:rgba(0,7,57,.1)}}@media (hover: hover)and (pointer: fine){.bal-close__button:focus-visible:not(:active){background:var(--bal-close-background-focus-visible)}}.bal-close__button:active{background:rgba(0,7,57,.3)}@media (hover: hover)and (pointer: fine){.bal-close__button--inverted:hover{background:rgba(255,255,255,.3)}}@media (hover: hover)and (pointer: fine){.bal-close__button--inverted:focus-visible:not(:active){background:var(--bal-close-background-focus-inverted-focus-visible)}}.bal-close__button--inverted:active{background:rgba(255,255,255,.5)}.bal-close__button--size-small{padding:.25rem}.bal-close__button--size-medium{padding:.531rem}"};export{l as bal_close}