import * as tslib_1 from "tslib";
import { getGlobalClassNames, HighContrastSelector } from '../../Styling';
import { IsFocusVisibleClassName } from '../../Utilities';
import { DocumentCardPreviewGlobalClassNames as previewClassNames } from './DocumentCardPreview.styles';
import { DocumentCardActivityGlobalClassNames as activityClassNames } from './DocumentCardActivity.styles';
import { DocumentCardTitleGlobalClassNames as titleClassNames } from './DocumentCardTitle.styles';
import { DocumentCardLocationGlobalClassNames as locationClassNames } from './DocumentCardLocation.styles';
var GlobalClassNames = {
    root: 'ms-DocumentCard',
    rootActionable: 'ms-DocumentCard--actionable',
    rootCompact: 'ms-DocumentCard--compact'
};
export var getStyles = function (props) {
    var _a, _b, _c;
    var className = props.className, theme = props.theme, actionable = props.actionable, compact = props.compact;
    var palette = theme.palette, fonts = theme.fonts;
    var classNames = getGlobalClassNames(GlobalClassNames, theme);
    var getFocusBorder = {
        selectors: {
            ':after': {
                pointerEvents: 'none',
                content: "''",
                position: 'absolute',
                left: -1,
                top: -1,
                bottom: -1,
                right: -1,
                border: '2px solid ' + palette.neutralSecondary,
                selectors: (_a = {},
                    _a[HighContrastSelector] = {
                        borderColor: 'Highlight'
                    },
                    _a)
            }
        }
    };
    return {
        root: [
            classNames.root,
            {
                WebkitFontSmoothing: 'antialiased',
                backgroundColor: palette.white,
                border: "1px solid " + palette.neutralLight,
                maxWidth: '320px',
                minWidth: '206px',
                userSelect: 'none',
                position: 'relative',
                selectors: (_b = {
                        ':focus': {
                            outline: '0px solid'
                        }
                    },
                    _b["." + IsFocusVisibleClassName + " &:focus"] = tslib_1.__assign({}, getFocusBorder),
                    _b["." + locationClassNames.root + " + ." + titleClassNames.root] = {
                        paddingTop: '4px'
                    },
                    _b)
            },
            actionable && [
                classNames.rootActionable,
                {
                    selectors: {
                        ':hover': {
                            cursor: 'pointer',
                            borderColor: palette.neutralTertiaryAlt
                        },
                        ':hover:after': {
                            content: '" "',
                            position: 'absolute',
                            top: 0,
                            right: 0,
                            bottom: 0,
                            left: 0,
                            border: "1px solid " + palette.neutralTertiaryAlt,
                            pointerEvents: 'none'
                        }
                    }
                }
            ],
            compact && [
                classNames.rootCompact,
                {
                    display: 'flex',
                    maxWidth: '480px',
                    height: '108px',
                    selectors: (_c = {},
                        _c["." + previewClassNames.root] = {
                            borderRight: "1px solid " + palette.neutralLight,
                            borderBottom: 0,
                            maxHeight: '106px',
                            maxWidth: '144px'
                        },
                        _c["." + previewClassNames.icon] = {
                            maxHeight: '32px',
                            maxWidth: '32px'
                        },
                        _c["." + activityClassNames.root] = {
                            paddingBottom: '12px'
                        },
                        _c["." + titleClassNames.root] = {
                            paddingBottom: '12px 16px 8px 16px',
                            fontSize: fonts.mediumPlus.fontSize,
                            lineHeight: '16px'
                        },
                        _c)
                }
            ],
            className
        ]
    };
};
//# sourceMappingURL=DocumentCard.styles.js.map