Liferay.Loader.define("@liferay/search-experiences-web@3.0.30/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/get_localized_learn_message_object","./SelectSXPBlueprintModal"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=_interopRequireDefault(a("@frontend-taglib-clay$clayui/button")),r=_interopRequireWildcard(a("@frontend-taglib-clay$clayui/form")),n=_interopRequireDefault(a("@frontend-taglib-clay$clayui/icon")),i=_interopRequireDefault(a("@frontend-taglib-clay$clayui/link")),u=a("@frontend-taglib-clay$clayui/modal"),c=_interopRequireDefault(a("@frontend-taglib-clay$clayui/sticker")),o=a("@frontend-taglib-clay$clayui/tooltip"),d=_interopRequireWildcard(a("liferay!frontend-js-react-web$react")),f=_interopRequireDefault(a("../../../sxp_blueprint_admin/js/utils/language/get_localized_learn_message_object")),p=_interopRequireDefault(a("./SelectSXPBlueprintModal"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var a={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=l?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(a,r,n):a[r]=e[r]}return a.default=e,t&&t.set(e,a),a}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=({initialFederatedSearchKey:e="",initialSXPBlueprintId:t="",initialSXPBlueprintTitle:a="",learnMessages:s,portletNamespace:y,preferenceKeyFederatedSearchKey:g,preferenceKeySXPBlueprintId:m})=>{const[b,_]=(0,d.useState)(e),[h,E]=(0,d.useState)(t),[v,C]=(0,d.useState)(a),[$,q]=(0,d.useState)(!1),{observer:j,onClose:k}=(0,u.useModal)({onClose:()=>q(!1)}),R=(0,f.default)("search-blueprint-on-search-page",s);return d.default.createElement(d.default.Fragment,null,$&&d.default.createElement(p.default,{observer:j,onClose:k,onSubmit:(e,t)=>{E(e),C(t)},selectedId:h}),d.default.createElement(r.ClayInput,{name:"".concat(y).concat(m),type:"hidden",value:h}),d.default.createElement(r.default.Group,null,d.default.createElement("label",{htmlFor:"".concat(y,"sxpBlueprintTitle")},Liferay.Language.get("blueprint")),d.default.createElement(r.ClayInput.Group,null,d.default.createElement(r.ClayInput.GroupItem,{prepend:!0},d.default.createElement(r.ClayInput,{name:"".concat(y,"sxpBlueprintTitle"),readOnly:!0,type:"text",value:v})),d.default.createElement(r.ClayInput.GroupItem,{append:!0,shrink:!0},d.default.createElement(l.default,{displayType:"secondary",onClick:()=>{q(!0)}},Liferay.Language.get("select"))),d.default.createElement(r.ClayInput.GroupItem,{shrink:!0},d.default.createElement(l.default,{displayType:"secondary",onClick:()=>{E(""),C("")}},Liferay.Language.get("remove")))),R.url&&d.default.createElement("div",{className:"form-text"},d.default.createElement(i.default,{className:"learn-message",href:R.url,key:"learn-how",rel:"noopener noreferrer",target:"_blank"},R.message))),d.default.createElement(r.default.Group,null,d.default.createElement("label",{htmlFor:"".concat(y).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(n.default,{"data-tooltip-align":"top",symbol:"info-circle"})))),d.default.createElement(r.ClayInput,{name:"".concat(y).concat(g),onChange:e=>{_(e.target.value)},value:b})))};t.default=_default}}));
//# sourceMappingURL=index.js.map