!function(e,a){"object"==typeof exports&&"object"==typeof module?module.exports=a():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],a):"object"==typeof exports?exports["openstack-uicore-foundation"]=a():e["openstack-uicore-foundation"]=a()}(this,(()=>(()=>{"use strict";var e={418:(e,a,r)=>{r.d(a,{default:()=>o});var t=r(6689),l=r.n(t);const o=({children:e,replaceNewLine:a=!1,className:r=""})=>l().createElement("span",{className:r,dangerouslySetInnerHTML:{__html:a?null==e?void 0:e.replace(/\n/g,"<br />"):e}})},3838:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},580:e=>{e.exports=require("prop-types")},6689:e=>{e.exports=require("react")}},a={};function r(t){var l=a[t];if(void 0!==l)return l.exports;var o=a[t]={exports:{}};return e[t](o,o.exports,r),o.exports}(()=>{r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a}),a}})(),(()=>{r.d=(e,a)=>{for(var t in a)r.o(a,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})}})(),(()=>{r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a)})(),(()=>{r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var t={};return(()=>{r.r(t),r.d(t,{default:()=>d});var e=r(3838),a=r.n(e),l=r(6689),o=r.n(l),n=r(418),s=r(580),i=r.n(s);const p=["onChange","value","className","error","ariaLabelledBy","disabled","options","id","name"];class d extends o().Component{constructor(e){super(e),this.state={value:e.value},this.handleChange=this.handleChange.bind(this)}handleChange(e){let a={target:{id:this.props.id,value:e.target.value,type:"radio"}};this.props.onChange(a)}getLabel(e,a,r,t,l){return r?o().createElement("label",{className:"form-check-label",htmlFor:`radio_${a}_${e.value}`,style:{display:"inline-block"}},l&&o().createElement(n.default,null,e.label),!l&&e.label):t?o().createElement("label",{className:"form-check-label",htmlFor:`radio_${a}_${e.value}`},e.label):o().createElement("label",{className:"form-check-label",htmlFor:`radio_${a}_${e.value}`,style:{display:"inline-block"}},o().createElement("h4",{style:{marginTop:"0px"}},e.label),o().createElement(n.default,null,e.description))}render(){let e,r=this.props,{onChange:t,value:l,className:n,error:s,ariaLabelledBy:i,disabled:d,options:c,id:u,name:h}=r,m=(a()(r,p),this.props.hasOwnProperty("error")&&""!=s),b=this.props.hasOwnProperty("inline"),f=this.props.hasOwnProperty("simple"),y=this.props.hasOwnProperty("html"),v=this.props.hasOwnProperty("disabled")&&1==d;return e=b?{paddingLeft:"22px",marginLeft:"20px",float:"left"}:{paddingLeft:"22px"},o().createElement("div",{id:`rl_wrapper_${u}`,"aria-labelledby":i},c.map((a=>{let r=a.value==l;return o().createElement("div",{className:"form-check abc-radio",key:`radio_key_${u}_${a.value}`,style:e},o().createElement("input",{className:"form-check-input",type:"radio",id:`radio_${u}_${a.value}`,value:a.value,checked:r,onChange:this.handleChange,disabled:v,name:h||`radio_${u}`}),this.getLabel(a,u,b,f,y))})),m&&o().createElement("p",{className:"error-label"},s))}}d.defaultProps={ariaLabelledBy:null},d.propTypes={id:i().string.isRequired}})(),t})()));
//# sourceMappingURL=radio-list.js.map