import styled, { css } from 'vue-styled-components';

const NavbarContainerLeftAndNavbarContainerRight = css`
    & > div:not(.no-style) {
        display: flex;
        float:left;
        justify-content: center;
        align-items: center;
        padding: 0 10px;
        font-size: 14px;
        cursor: pointer;
        user-select: none;
        color: #666;
    }
`;

const ViewportContainerBoxAndPreviewContainer = css`
    display: flex;
     float:left;
    position: relative;
    flex-basis: 0%;
    flex-grow: 1;
    ${(props) => props.theme.hidden && `
        display: none;
    `}
`;

export const Container = styled('div', { componentId: 'Container' })`
    display: flex;
    width: 100%;
     float:left;
    height: 100%;
    overflow: hidden;
`;

export const LeftContainer = styled('div', { componentId: 'LeftContainer' })`
    display: flex;
    flex-direction: column;
     float:left;
    flex-grow: 1;
    width: 0;
`;

export const RightContainer = styled('div', { componentId: 'RightContainer', theme: Object })`
    display: flex;
     float:left;
    width: 300px;
    z-index: 2;
    background-color: white;
    overflow: auto;
    border-left: 1px solid #ddd;

    ${(props) => props.theme.hidden && `
        display: none;
    `}
`;

export const NavbarContainer = styled.div`
    display: none;
     float:left;
    justify-content: space-between;
    background-color: whitesmoke;
    border-bottom: 1px solid #ddd;
`;

export const NavbarContainerLeft = styled.div`
    display: flex;
     float:left;
    & > div:not(.no-style) {
        border-right: 1px solid #ddd;
    }
    ${NavbarContainerLeftAndNavbarContainerRight}
`;

export const NavbarContainerRight = styled.div`
    display: flex;
     float:left;
    justify-content: flex-end;
    & > div:not(.no-style) {
        border-left: 1px solid #ddd;
    }
    ${NavbarContainerLeftAndNavbarContainerRight}
`;

export const ViewportContainer = styled.div`
    display: flex;
     float:left;
    flex-grow: 1;
    height: 0;
`;

export const ViewportContainerLeft = styled('div', {theme: Object})`
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 40px;
    
    background-color: white;
    z-index: 1;
    background-color: whitesmoke;
    border-right: 1px solid #ddd;
    ${(props) => props.theme.hidden && `
        display: none;
    `}
`;

export const ViewportContainerLeftTop = styled.div`
    width: 100%;
    display:none;
    & > div {
        display: flex;
         float:left;
        justify-content: center;
        align-items: center;
        font-size: 14px;
        height: 40px;
        fill: #666;
        cursor: pointer;
        user-select: none;
        border-bottom: 1px solid #ddd;
        &:hover {
            background-color: white;
        }
    }
`;

export const ViewportContainerLeftBottom = styled.div`
    width: 100%;
     display:none;
    & > div {
        display: flex;
         float:left;
        justify-content: center;
        align-items: center;
        font-size: 14px;
        height: 30px;
        cursor: pointer;
        user-select: none;
        &:hover {
            background-color: #eaeaea;
        }
    }
`;

export const ViewportContainerRight = styled('div', {theme: Object})`
    display: flex;
    margin-left: -300px;
     float:left;
    flex-grow: 1;
    width: 0;
    transition: all .15s;
    ${(props) => props.theme.transparent && `
        //background-image: url('../images/transparent.png');
    `}
    ${(props) => props.theme.showLeft && `
        margin-left: 0;
    `}
`;

export const FooterContainer = styled.div`
    display: flex;
    height: 30px;
     float:left;
    border-top: 1px solid #ddd;
    background-color: whitesmoke;
`;

export const ToolsContainer = styled('div', {theme: Object})`
    display: flex;
    flex-direction: row;
     float:left;
    background-color: #fff;
    position: relative;
    width: 300px;
    ${(props) => props.theme.fullScreen && `
       width: 100%;
    `}
`;

export const ToolsContainerLeft = styled.div`
    display: flex;
    flex-direction: column;
    width: 300px;
    position:relative;
      overflow: hidden;
    border-right: 1px solid #ddd;
`;

export const ToolsContainerRight = styled('div', {theme: Object})`
    display: flex;
    flex-direction: column;
     float:left;
    display: none;
    flex-grow: 1;
    flex-basis: 0%;
    ${(props) => props.theme.show && `
       display: block;
    `}
`;

export const ViewportContainerBox = styled('div', {theme: Object})`
    ${ViewportContainerBoxAndPreviewContainer}
    overflow-x: hidden;
`;

export const PreviewContainer = styled('div', {theme: Object})`
    ${ViewportContainerBoxAndPreviewContainer}
    overflow-y: auto;
`;

export const ModalTitleContainer = styled.div`
    display: flex;
     float:left;
    flex-direction: row;
    justify-content: space-between;
    height: 45px;
    padding: 0 15px;
    border-bottom: 1px solid #ddd;
`;

export const ModalTitle = styled.div`
    display: flex;
    align-items: center;
     float:left;
    font-size: 18px;
    color: #666;
    font-weight: bold;
`;

export const ModalTitleClose = styled.div`
    display: flex;
     float:left;
    align-items: center;
    fill: #999;
    cursor: pointer;
    &:hover {
        fill: #333;
    }
`;
