import { m as motion } from "framer-motion"; import styled from "styled-components"; type StyledWindowProps = { $rounded?: boolean; $showShadows?: boolean; $previewOnMe?: boolean; $backgroundColor?: string; $isPreview?: boolean; $isForeground: boolean; }; // Since Windows 11, there is rounded corners for displayed windows // so border-radius is added if the window is not maximized or in snap mode. const StyledWindow = styled(motion.section) ` background-color: ${({ $backgroundColor, theme }) => $backgroundColor || theme.colors.window.background}; box-shadow: ${({ $showShadows, $isForeground, theme }) => $showShadows ? $isForeground ? theme.colors.window.shadow : theme.colors.window.shadowInactive : "none"}; contain: strict; ${({ $isPreview, $previewOnMe }) => $isPreview && !$previewOnMe && `opacity: 0.5!important;`} ${({ $isPreview, $previewOnMe }) => ($isPreview && $previewOnMe) && `border: 2px dashed #3af2a2;`} border-radius: ${({ $rounded }) => ($rounded ? "6px" : "0")}; height: 100%; outline: ${({ $isForeground, theme }) => `${theme.sizes.window.outline} solid ${$isForeground ? theme.colors.window.outline : theme.colors.window.outlineInactive }`}; overflow: hidden; position: relative; width: 100%; `; export default StyledWindow;