Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.156/page_editor/app/components/fragment_configuration_fields/HideFromSearchField",["module","exports","require","@frontend-taglib-clay$clayui/button","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../config/constants/viewportSizes","../../contexts/ControlsContext","../../contexts/StoreContext","../../thunks/updateItemConfig","./CheckboxField"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.HideFromSearchField=function HideFromSearchField({item:e}){const t=(0,l.useDispatch)(),n=(0,l.useSelector)((e=>e.selectedViewportSize)),c=(0,l.useSelector)((e=>e.layoutData)),f=(0,o.useSelectItem)();if(n!==r.VIEWPORT_SIZES.desktop)return null;const s=getHiddenAncestorId(c,e);return i.default.createElement(i.default.Fragment,null,i.default.createElement(u.CheckboxField,{disabled:Boolean(s),field:{label:Liferay.Language.get("hide-from-site-search-results"),name:"indexed"},onValueSelect:(n,a)=>{t((0,d.default)({itemConfig:{[n]:!a},itemId:e.itemId}))},title:s?Liferay.Language.get("configuration-inherited-from-parent-fragment"):null,value:s||!1===e.config.indexed}),s&&i.default.createElement(i.default.Fragment,null,i.default.createElement("p",{className:"m-0 small text-secondary"},Liferay.Language.get("this-configuration-is-inherited")),i.default.createElement(a.default,{className:"p-0 page-editor__hide-feedback-button text-left",displayType:"link",onClick:()=>f(s)},Liferay.Language.get("go-to-parent-fragment-to-edit"))))};var a=_interopRequireDefault(n("@frontend-taglib-clay$clayui/button")),i=(_interopRequireDefault(n("liferay!frontend-js-react-web$prop-types")),_interopRequireDefault(n("liferay!frontend-js-react-web$react"))),r=n("../../config/constants/viewportSizes"),o=n("../../contexts/ControlsContext"),l=n("../../contexts/StoreContext"),d=_interopRequireDefault(n("../../thunks/updateItemConfig")),u=n("./CheckboxField");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function getHiddenAncestorId(e,t){const n=e.items[t.parentId];return n?!1===n.config.indexed?n.itemId:getHiddenAncestorId(e,n):null}}}));
//# sourceMappingURL=HideFromSearchField.js.map