Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.169/page_editor/plugins/browser/components/page_structure/components/VisibilityButton",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/icon","liferay!frontend-js-react-web$classnames","frontend-js-web","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../../../../app/utils/getFormErrorDescription","../../../../../app/utils/updateItemStyle","../../../../../app/utils/useHasRequiredChild"],(function(e,t,i){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function VisibilityButton({className:e,dispatch:t,node:i,selectedViewportSize:p,visible:c}){const f=(0,u.default)(i.id);return l.default.createElement(r.default,{"aria-label":(0,o.sub)(i.hidden||i.hiddenAncestor?Liferay.Language.get("show-x"):Liferay.Language.get("hide-x"),[i.name]),className:(0,n.default)("page-editor__page-structure__tree-node__visibility-button "+e,{"page-editor__page-structure__tree-node__visibility-button--visible":c}),disabled:i.isMasterItem||i.hiddenAncestor,displayType:"unstyled",onClick:e=>{if(e.stopPropagation(),(0,d.default)({dispatch:t,itemId:i.id,selectedViewportSize:p,styleName:"display",styleValue:i.hidden?"block":"none"}),!i.hidden&&f()){const{message:e}=(0,s.getFormErrorDescription)({type:s.FORM_ERROR_TYPES.hiddenFragment});(0,o.openToast)({message:e,type:"warning"})}}},l.default.createElement(a.default,{symbol:i.hidden||i.hiddenAncestor?"hidden":"view"}))};var r=_interopRequireDefault(i("@frontend-taglib-clay$clayui/button")),a=_interopRequireDefault(i("@frontend-taglib-clay$clayui/icon")),n=_interopRequireDefault(i("liferay!frontend-js-react-web$classnames")),o=i("frontend-js-web"),l=(_interopRequireDefault(i("liferay!frontend-js-react-web$prop-types")),_interopRequireDefault(i("liferay!frontend-js-react-web$react"))),s=i("../../../../../app/utils/getFormErrorDescription"),d=_interopRequireDefault(i("../../../../../app/utils/updateItemStyle")),u=_interopRequireDefault(i("../../../../../app/utils/useHasRequiredChild"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=VisibilityButton.js.map