Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.169/page_editor/app/components/ViewportSizeSelector",["module","exports","require","@frontend-taglib-clay$clayui/button","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../common/components/PopoverTooltip","../../common/hooks/useId","../config/constants/viewportSizes","../config/index"],(function(e,t,o){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function ViewportSizeSelector({onSizeSelected:e,selectedSize:t}){const{availableViewportSizes:o}=p.config;return n.default.createElement(r.default.Group,{className:"flex-nowrap flex-shrink-0"},Object.values(o).map((({icon:o,label:r,sizeId:i})=>n.default.createElement(SelectorButton,{icon:o,key:i,label:r,onSelect:e,selectedSize:t,sizeId:i}))))};var r=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 o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var n=r?Object.getOwnPropertyDescriptor(e,i):null;n&&(n.get||n.set)?Object.defineProperty(o,i,n):o[i]=e[i]}o.default=e,t&&t.set(e,o);return o}(o("@frontend-taglib-clay$clayui/button")),i=_interopRequireDefault(o("liferay!frontend-js-react-web$classnames")),n=(_interopRequireDefault(o("liferay!frontend-js-react-web$prop-types")),_interopRequireDefault(o("liferay!frontend-js-react-web$react"))),a=o("../../common/components/PopoverTooltip"),l=o("../../common/hooks/useId"),s=o("../config/constants/viewportSizes"),p=o("../config/index");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}const e={desktop:Liferay.Language.get("the-styles-you-define-in-the-desktop-viewport-apply-to-all-other-viewports-unless-you-specify-a-style-in-another-viewport"),landscapeMobile:Liferay.Language.get("the-styles-you-define-in-the-landscape-phone-viewport-apply-to-the-portrait-phone-viewport-unless-you-specify-a-style-in-the-portrait-phone-viewport"),portraitMobile:Liferay.Language.get("the-portrait-phone-viewport-reflects-the-style-changes-you-make-in-any-other-viewport-unless-you-specify-a-style-in-the-portrait-phone-viewport"),tablet:Liferay.Language.get("the-styles-you-define-in-the-tablet-viewport-apply-to-all-the-phone-viewports-unless-you-specify-a-style-in-the-landscape-or-portrait-phone-viewports")},SelectorButton=({icon:t,label:o,onSelect:p,selectedSize:c,sizeId:u})=>{const f=(0,l.useId)();return n.default.createElement(a.PopoverTooltip,{alignPosition:"bottom",content:e[u],header:u===s.VIEWPORT_SIZES.desktop&&Liferay.Language.get("default-viewport"),id:f,showTooltipOnClick:!1,trigger:n.default.createElement(r.ClayButtonWithIcon,{"aria-label":o,"aria-pressed":c===u,className:(0,i.default)({"page-editor__viewport-size-selector--default":u===s.VIEWPORT_SIZES.desktop}),displayType:"secondary",key:u,onClick:()=>p(u),size:"sm",symbol:t})})}}}));
//# sourceMappingURL=ViewportSizeSelector.js.map