"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react"),m=require("react-router-dom"),c=require("./Icons/Icons.js");require("./Icons/EuiIcon.js");require("@elastic/eui");const g=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},t=g(d),l=({onClick:e,link:o,label:a,icon:r,className:u,type:n,onCloseModal:s})=>{if(o&&typeof o=="string")return t.default.createElement(m.Link,{to:o},t.default.createElement("button",{type:n||"button",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-600 hover:text-green-600 hover:border-green-600 "+u},r&&t.default.createElement(c.Icons,{name:r,className:"inline-flex w-5 h-5 mr-1 opacity-75 "}),a));const f=i=>e&&typeof e=="string"?e==="closeModal"?s():console.log("onClick string"):e&&e(i);return t.default.createElement("button",{type:n||"button",onClick:f,className:"inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-600 hover:text-green-600 hover:border-green-600 "+u},r&&t.default.createElement(c.Icons,{name:r,className:"inline-flex w-5 h-5 mr-1 opacity-75"}),a)},y=({data:e,onCloseModal:o})=>{let a=[],r=[],u=[];return e.map((n,s)=>{if(n.layout==="left"){r.push(t.default.createElement(l,{key:s,...n,onCloseModal:o}));return}if(n.layout==="right"){u.push(t.default.createElement(l,{key:s,...n,onCloseModal:o}));return}a.push(t.default.createElement(l,{key:s,...n,onCloseModal:o}))}),t.default.createElement("div",{className:`flex mt-6 ${r.length!==0||u.length!==0?"justify-between":""}`},t.default.createElement("div",null,r),t.default.createElement("div",{className:"ml-28"},a),t.default.createElement("div",null,u))};exports.Button=l;exports.Buttons=y;
//# sourceMappingURL=Button.js.map
