/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { Button } from '@wordpress/components';
import { Icon, wordpress } from '@wordpress/icons';
import { getSetting } from '@woocommerce/wc-admin-settings';
import { useSelect } from '@wordpress/data';
import { useEffect } from 'react';
import classnames from 'classnames';
/**
* Internal dependencies
*/
import useIsScrolled from '../../../hooks/useIsScrolled';
const Header = () => {
const siteTitle = getSetting( 'siteTitle', '' );
const siteUrl = getSetting( 'siteUrl', '' );
const isScrolled = useIsScrolled();
const toggleFolded = () => {
document.body.classList.toggle( 'is-folded' );
};
const foldOnMobile = ( screenWidth ) => {
if ( screenWidth <= 960 ) {
document.body.classList.add( 'is-folded' );
}
};
useEffect( () => {
foldOnMobile( document.body.clientWidth );
window.addEventListener(
'orientationchange',
( e ) => foldOnMobile( e.target.screen.availWidth ),
false
);
}, [] );
let buttonIcon =