import{r as registerInstance,c as createEvent,h,H as Host}from"./index-ca411ad2.js";import{m as messageId,P as PdsLabel,a as assignDescription}from"./pds-label-bea9ee54.js";var pdsRadioCss='.sc-pds-radio-h{--border-interactive-default:var(--pine-border-width-thin) solid var( --pine-color-grey-400);--border-radius:50%;--box-shadow-focus:0 0 0 2px var(--color-focus);--box-shadow-focus-error:0 0 0 2px var(--color-invalid-focus);--color:var(--pine-color-charcoal-200);--color-background:var(--pine-color-white);--color-background-hover:var(--pine-color-grey-100);--color-background-disabled:var(--pine-color-grey-200);--color-border-hover:var(--pine-color-grey-500);--color-border-disabled:var(--pine-color-grey-300);--color-checked:var(--pine-color-charcoal-500);--color-disabled:var(---pine-color-grey-500);--color-focus:var(--pine-color-blue-200);--color-invalid:var(--pine-color-red-300);--color-invalid-focus:var(--pine-color-red-200);--font-size:var(--pine-font-size-087);--sizing-check-size:6px;--sizing-input-size:16px;--sizing-margin-block-start:6px;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap}.is-invalid.sc-pds-radio-h input.sc-pds-radio{border-color:var(--color-invalid)}.is-invalid.sc-pds-radio-h input.sc-pds-radio:checked{background:var(--color-invalid)}.is-invalid.sc-pds-radio-h input.sc-pds-radio:focus-visible{-webkit-box-shadow:var(--box-shadow-focus-error);box-shadow:var(--box-shadow-focus-error);outline:none}.is-invalid.sc-pds-radio-h label.sc-pds-radio,.is-invalid.sc-pds-radio-h .pds-radio__message--error.sc-pds-radio{color:var(--color-invalid)}input.sc-pds-radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:var(--border-interactive-default);border-radius:var(--border-radius);height:var(--sizing-input-size);margin:0;position:relative;width:var(--sizing-input-size)}input.sc-pds-radio:hover{background:var(--color-background-hover);border-color:var(--color-border-hover)}input.sc-pds-radio:checked{background:var(--color-checked);border-color:var(--color-checked)}input.sc-pds-radio:checked::after{background:var(--color-background);border-radius:50%;content:"";display:block;height:var(--sizing-check-size);left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);width:var(--sizing-check-size)}input.sc-pds-radio:disabled{background:var(--color-background-disabled);border-color:var(--color-border-disabled);cursor:not-allowed}input.sc-pds-radio:disabled:checked{background:var(--color-disabled);border-color:var(--color-border-disabled)}input.sc-pds-radio:disabled:checked::after{border-color:var(--color-border-disabled)}input.sc-pds-radio:disabled+label.sc-pds-radio{color:var(--color-border-hover);cursor:not-allowed}input.sc-pds-radio:disabled~.pds-radio__message.sc-pds-radio{color:var(--color-disabled)}input.sc-pds-radio:focus-visible{-webkit-box-shadow:var(--box-shadow-focus);box-shadow:var(--box-shadow-focus);outline:none}label.sc-pds-radio{-webkit-margin-start:10px;margin-inline-start:10px}.pds-radio__message.sc-pds-radio{color:var(--color);font-size:var(--font-size);-webkit-margin-before:var(--sizing-margin-block-start);margin-block-start:var(--sizing-margin-block-start);-webkit-margin-start:26px;margin-inline-start:26px;width:100%}';var PdsRadioStyle0=pdsRadioCss;var PdsRadio=function(){function r(r){var i=this;registerInstance(this,r);this.pdsRadioChange=createEvent(this,"pdsRadioChange",7);this.handleRadioChange=function(r){if(i.disabled){return}var o=r.target;var e=o.checked;i.pdsRadioChange.emit(e)};this.checked=false;this.disabled=false;this.errorMessage=undefined;this.invalid=false;this.componentId=undefined;this.label=undefined;this.helperMessage=undefined;this.name=undefined;this.required=false;this.value=undefined}r.prototype.classNames=function(){var r=[];if(this.invalid){r.push("is-invalid")}if(this.disabled){r.push("is-disabled")}return r.join("  ")};r.prototype.render=function(){return h(Host,{key:"e23a00c8941dfce9d9d6a99a554654b7bd2259c4",class:this.classNames()},h("input",{key:"571d2e6656cd94573253f54028b1926a3c5e1499","aria-describedby":assignDescription(this.componentId,this.invalid,this.helperMessage),"aria-invalid":this.invalid?"true":undefined,type:"radio",id:this.componentId,name:this.name,value:this.value,checked:this.checked,required:this.required,disabled:this.disabled,onChange:this.handleRadioChange}),h(PdsLabel,{key:"42c2c95ed36e194f43367f2c28ed81660d82b096",htmlFor:this.componentId,text:this.label}),this.helperMessage&&h("div",{key:"32be02934f23b2832c6c1d0e56c3dceda8c9ccc9",class:"pds-radio__message",id:messageId(this.componentId,"helper")},this.helperMessage),this.errorMessage&&h("div",{key:"c670effc6a381f872800c8dd58095c2dce49016e",class:"pds-radio__message pds-radio__message--error",id:messageId(this.componentId,"error"),"aria-live":"assertive"},this.errorMessage))};return r}();PdsRadio.style=PdsRadioStyle0;export{PdsRadio as pds_radio};
//# sourceMappingURL=pds-radio.entry.js.map