Liferay.Loader.define("@liferay/search-experiences-web@3.0.7/sxp_blueprint_options/js/configuration/index",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/form","@frontend-taglib-clay$clayui/icon","@frontend-taglib-clay$clayui/link","@frontend-taglib-clay$clayui/modal","@frontend-taglib-clay$clayui/sticker","@frontend-taglib-clay$clayui/tooltip","liferay!frontend-js-react-web$react","../../../sxp_blueprint_admin/js/utils/language","./SelectSXPBlueprintModal"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=g(a("@frontend-taglib-clay$clayui/button")),n=s(a("@frontend-taglib-clay$clayui/form")),r=g(a("@frontend-taglib-clay$clayui/icon")),i=g(a("@frontend-taglib-clay$clayui/link")),u=a("@frontend-taglib-clay$clayui/modal"),c=g(a("@frontend-taglib-clay$clayui/sticker")),o=a("@frontend-taglib-clay$clayui/tooltip"),d=s(a("liferay!frontend-js-react-web$react")),f=a("../../../sxp_blueprint_admin/js/utils/language"),p=g(a("./SelectSXPBlueprintModal"));function y(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return y=function(){return e},e}function s(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=y();if(t&&t.has(e))return t.get(e);var a={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=l?Object.getOwnPropertyDescriptor(e,n):null;r&&(r.get||r.set)?Object.defineProperty(a,n,r):a[n]=e[n]}return a.default=e,t&&t.set(e,a),a}function g(e){return e&&e.__esModule?e:{default:e}}var m=({initialFederatedSearchKey:e="",initialSXPBlueprintId:t="",initialSXPBlueprintTitle:a="",learnMessages:y,portletNamespace:s,preferenceKeyFederatedSearchKey:g,preferenceKeySXPBlueprintId:m})=>{const[b,h]=(0,d.useState)(e),[E,v]=(0,d.useState)(t),[$,k]=(0,d.useState)(a),[C,L]=(0,d.useState)(!1),{observer:S,onClose:j}=(0,u.useModal)({onClose:()=>L(!1)}),I=(0,f.getLocalizedLearnMessageObject)("search-blueprint-on-search-page",y);return d.default.createElement(d.default.Fragment,null,C&&d.default.createElement(p.default,{observer:S,onClose:j,onSubmit:(e,t)=>{v(e),k(t)},selectedId:E}),d.default.createElement(n.ClayInput,{name:"".concat(s).concat(m),type:"hidden",value:E}),d.default.createElement(n.default.Group,null,d.default.createElement("label",{htmlFor:"".concat(s,"sxpBlueprintTitle")},Liferay.Language.get("blueprint")),d.default.createElement(n.ClayInput.Group,null,d.default.createElement(n.ClayInput.GroupItem,{prepend:!0},d.default.createElement(n.ClayInput,{name:"".concat(s,"sxpBlueprintTitle"),readOnly:!0,type:"text",value:$})),d.default.createElement(n.ClayInput.GroupItem,{append:!0,shrink:!0},d.default.createElement(l.default,{displayType:"secondary",onClick:()=>{L(!0)}},Liferay.Language.get("select"))),d.default.createElement(n.ClayInput.GroupItem,{shrink:!0},d.default.createElement(l.default,{displayType:"secondary",onClick:()=>{v(""),k("")}},Liferay.Language.get("remove")))),I.url&&d.default.createElement("div",{className:"form-text"},d.default.createElement(i.default,{className:"learn-message",href:I.url,key:"learn-how",rel:"noopener noreferrer",target:"_blank"},I.message))),d.default.createElement(n.default.Group,null,d.default.createElement("label",{htmlFor:"".concat(s).concat(g)},Liferay.Language.get("federated-search-key"),d.default.createElement(o.ClayTooltipProvider,null,d.default.createElement(c.default,{displayType:"unstyled",size:"sm",title:Liferay.Language.get("enter-the-key-of-an-alternate-search-this-widget-is-participating-on-if-not-set-widget-participates-on-default-search")},d.default.createElement(r.default,{"data-tooltip-align":"top",symbol:"info-circle"})))),d.default.createElement(n.ClayInput,{name:"".concat(s).concat(g),onChange:e=>{h(e.target.value)},value:b})))};t.default=m}}));
//# sourceMappingURL=index.js.map