Liferay.Loader.define("data-engine-js-components-web@1.0.79/js/custom/form-report/components/card-shortcut/CardShortcut",["module","exports","require","liferay!frontend-js-react-web$react","../../utils/fieldTypes","../sidebar/SidebarContext"],(function(e,t,r){var n;window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({fields:t}){const[r,n]=(0,a.useState)(),{portletNamespace:c}=(0,a.useContext)(l.SidebarContext),u=t.map(((t,l)=>{if(Object.keys(o.default).includes(t.type))return a.default.createElement("li",{key:"card-item-".concat(l)},a.default.createElement("a",{className:"".concat(r===l?"selected":""),"data-senna-off":!0,onClick:()=>{n(l),((e,t)=>{const r=document.getElementById("".concat(e,"card_").concat(t));null!==r&&r.scrollIntoView()})(c,l)}},a.default.createElement("div",{className:"indicator"}),a.default.createElement("div",{className:"field-label"},(u=t.label).length>e?u.substr(0,e)+"...":u)));var u}));return a.default.createElement("ul",null,u)};var a=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),o=(n=r("../../utils/fieldTypes"))&&n.__esModule?n:{default:n},l=r("../sidebar/SidebarContext");function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}const e=91}}));
//# sourceMappingURL=CardShortcut.js.map