deleteAkter(ids)}\n sortColumn={'registreradTidpunkt'}\n sortOrder=\"desc\"\n sortType=\"Date\"\n />\n \n );\n};\n\nexport default AktLista;\n","import AktLista from './AktLista';\r\n\r\nimport { useEffect, useState } from 'react';\r\nimport * as AktClient from './AktClient';\r\nimport { MetriaAktMetadata } from './types/MetriaAktMetadata';\r\n\r\nimport { Alert, Link } from '@mui/material';\r\nimport ErrorBoundary from '../ErrorBoundary';\r\nimport { NySokContainer } from '../NySokContainer';\r\nimport { removeStorageKey } from '../common/lib/storage';\r\nimport { LoadState } from '../types/LoadState';\r\nimport { LMAktMetadata } from './types/LMAktMetadata';\r\n\r\nexport const isValidAktbeteckning = (aktbeteckning: string): boolean => {\r\n aktbeteckning = aktbeteckning.trim();\r\n const regExp = new RegExp(/^(?:[0|1][0-9]|2[0-5]|99).{2,}/gm);\r\n return regExp.test(aktbeteckning);\r\n};\r\n\r\nexport const aktformatStorageKey = 'aktformat';\r\n\r\nexport const SokAkt: React.FC = () => {\r\n const maxPollTime = 3600000; // 1 hour\r\n const pollInterval = 5000;\r\n\r\n const [isPolling, setIsPolling] = useState(false);\r\n const [_buyLoadState, setBuyLoadState] = useState(LoadState.Idle);\r\n const [_searchResult, setSearchResult] = useState();\r\n const [savedAkter, setSavedAkter] = useState([]);\r\n const [pollingError, setPollingError] = useState('');\r\n\r\n useEffect(() => startPolling(), []);\r\n\r\n const startPolling = (beteckning?: string) => {\r\n if (isPolling) {\r\n return;\r\n }\r\n setIsPolling(true);\r\n\r\n const getAllAkter = async (pollCount: number) => {\r\n if (pollCount * pollInterval > maxPollTime) {\r\n setIsPolling(false);\r\n return setPollingError('Nedladdning av akt tog för lång tid.');\r\n }\r\n const result = await AktClient.listAkter();\r\n if (result.success) {\r\n const akter = result.data;\r\n setSavedAkter(akter);\r\n if (\r\n (!beteckning ||\r\n akter.find((akt) => akt.aktbeteckning === beteckning)) &&\r\n !akter.find((akt) => akt.status !== 'HAMTAD')\r\n ) {\r\n setPollingError('');\r\n setIsPolling(false);\r\n setSearchResult(undefined);\r\n setBuyLoadState(LoadState.Idle);\r\n } else {\r\n setTimeout(() => getAllAkter(++pollCount), pollInterval);\r\n }\r\n } else {\r\n setPollingError(\r\n result.statusCode === 401 || result.statusCode === 403\r\n ? 'Du har blivit utloggad. Ladda om sidan och logga in igen.'\r\n : 'Oväntat fel när sparade akter skulle hämtas.'\r\n );\r\n if (result.statusCode >= 500) {\r\n setTimeout(() => getAllAkter(++pollCount), pollInterval);\r\n } else {\r\n setIsPolling(false);\r\n }\r\n }\r\n };\r\n\r\n getAllAkter(0);\r\n };\r\n\r\n return (\r\n removeStorageKey(aktformatStorageKey)}>\r\n \r\n \r\n
\r\n För närvarande kan Metria inte tillhandahålla akter via\r\n FastighetSök. Vi hänvisar er tills vidare till Lantmäteriet för\r\n manuella beställningar av de akter ni behöver via länken:{' '}\r\n \r\n Beställningsformulär\r\n \r\n
\r\n
\r\n Vi följer utvecklingen av situationen hos Lantmäteriet. Vår\r\n förhoppning är att kunna återgå till att erbjuda akter via\r\n FastighetSök inom en snar framtid.\r\n
\r\n
\r\n Från och med 2024-05-24 har Lantmäteriet stoppat åtkomsten till\r\n digitala akter av säkerhetsskäl. Stoppet gäller för närvarande på\r\n obestämd tid.\r\n \r\n Uppdaterat 2024-11-29\r\n \r\n
\r\n \r\n \r\n {/* Bortkommenterat i väntan på att LM ska fixa Akt Direkt. */}\r\n {/* */}\r\n {pollingError && {pollingError}}\r\n {\r\n const result = await AktClient.taBortAkter(ids);\r\n if (result.success) {\r\n startPolling();\r\n }\r\n }}\r\n />\r\n \r\n );\r\n};\r\n","import { getBaseUrl } from '../../common/getBaseUrl';\nimport {\n deleteData,\n getBlobData,\n getData,\n postData,\n putData,\n} from '../../common/getData';\nimport { createHeaders } from '../../common/lib/createHeaders';\nimport { ApiResponse } from '../../types/ApiResponse';\nimport { BlobApiResponse } from '../../types/BlobApiResponse';\nimport {\n BostadAutocompleteDto,\n BostadsinformationDto,\n VarderingParametrarDto,\n BostadsvarderingDto,\n} from '../types/dtos/VarderingarModel';\n\nconst port = '8567';\nconst path = '/api/vardering/v1';\nexport const baseUrl = () => getBaseUrl(path, port);\n\nexport const getAutocompleteKommun = async (\n searchString: string\n): Promise> =>\n getData(\n `${baseUrl()}/autocomplete/kommun?kommun=${searchString}&max-hits=500`,\n createHeaders()\n );\n\nexport const getAutocompleteAdress = async (\n selectedKommun: string,\n searchString: string\n): Promise> =>\n getData(\n `${baseUrl()}/autocomplete/adress?kommun=${selectedKommun}&adress=${encodeURIComponent(\n searchString\n )}`,\n createHeaders()\n );\n\nexport const getDataFromBostadsregistret = async (\n postort: string,\n adress: string\n): Promise> =>\n getData(\n `${baseUrl()}/autocomplete/bostadsregistret?postort=${postort}&adress=${adress}`,\n createHeaders()\n );\n\nexport const getCoordinatesForAdress = async (\n postort: string,\n adress: string\n): Promise> =>\n getData(\n `${baseUrl()}/autocomplete/coordinates?postort=${postort}&adress=${adress}`,\n createHeaders()\n );\n\nexport const getBostadFromBostadsregistret = async (\n id: number\n): Promise> =>\n getData(`${baseUrl()}/autocomplete/bostadsregistret/${id}`, createHeaders());\n\nexport const createVardering = async (\n varderingsParametrar: VarderingParametrarDto,\n kundmarke?: string\n): Promise> =>\n postData(\n `${baseUrl()}/varderingar`,\n varderingsParametrar,\n createHeaders(undefined, kundmarke)\n );\n\nexport const createOmvardering = async (\n id: string,\n varderingsParametrar: VarderingParametrarDto,\n kundmarke?: string\n): Promise> =>\n putData(\n `${baseUrl()}/varderingar/${id}`,\n varderingsParametrar,\n createHeaders(undefined, kundmarke)\n );\n\nexport const getVardering = async (\n uuid: string\n): Promise> =>\n getData(`${baseUrl()}/varderingar/${uuid}`, createHeaders());\n\nexport const getAllVarderingar = async (): Promise<\n ApiResponse\n> => getData(`${baseUrl()}/varderingar`, createHeaders());\n\nexport const updateVardering = async (\n uuid: string,\n varderingsParametrar: VarderingParametrarDto\n): Promise> =>\n putData(\n `${baseUrl()}/varderingar/${uuid}`,\n varderingsParametrar,\n createHeaders()\n );\n\nexport const deleteVardering = async (uuid: string): Promise =>\n deleteData(`${baseUrl()}/varderingar/${uuid}`, undefined, createHeaders());\n\nexport const deleteVarderings = async (\n uuids: string[]\n): Promise> =>\n deleteData(`${baseUrl()}/varderingar`, uuids, createHeaders());\n\nexport const getVarderingsPdf = async (\n uuid: string\n): Promise =>\n getBlobData(`${baseUrl()}/varderingar/${uuid}/pdf`, createHeaders());\n\nexport const getKartaForVarderingar = (\n uuid: string\n): Promise =>\n getBlobData(`${baseUrl()}/varderingar/${uuid}/karta`, createHeaders());\n\nexport const getPdfForVardering = (uuid: string): Promise =>\n getBlobData(\n `${baseUrl()}/varderingar/${uuid}/pdf`,\n createHeaders('application/pdf')\n );\n","// Source from https://github.com/alitaheri/normalize-scroll-left\nlet cachedType;\n/**\n * Based on the jquery plugin https://github.com/othree/jquery.rtl-scroll-type\n *\n * Types of scrollLeft, assuming scrollWidth=100 and direction is rtl.\n *\n * Type | <- Most Left | Most Right -> | Initial\n * ---------------- | ------------ | ------------- | -------\n * default | 0 | 100 | 100\n * negative (spec*) | -100 | 0 | 0\n * reverse | 100 | 0 | 0\n *\n * Edge 85: default\n * Safari 14: negative\n * Chrome 85: negative\n * Firefox 81: negative\n * IE11: reverse\n *\n * spec* https://drafts.csswg.org/cssom-view/#dom-window-scroll\n */\n\nexport function detectScrollType() {\n if (cachedType) {\n return cachedType;\n }\n\n const dummy = document.createElement('div');\n const container = document.createElement('div');\n container.style.width = '10px';\n container.style.height = '1px';\n dummy.appendChild(container);\n dummy.dir = 'rtl';\n dummy.style.fontSize = '14px';\n dummy.style.width = '4px';\n dummy.style.height = '1px';\n dummy.style.position = 'absolute';\n dummy.style.top = '-1000px';\n dummy.style.overflow = 'scroll';\n document.body.appendChild(dummy);\n cachedType = 'reverse';\n\n if (dummy.scrollLeft > 0) {\n cachedType = 'default';\n } else {\n dummy.scrollLeft = 1;\n\n if (dummy.scrollLeft === 0) {\n cachedType = 'negative';\n }\n }\n\n document.body.removeChild(dummy);\n return cachedType;\n} // Based on https://stackoverflow.com/a/24394376\n\nexport function getNormalizedScrollLeft(element, direction) {\n const scrollLeft = element.scrollLeft; // Perform the calculations only when direction is rtl to avoid messing up the ltr behavior\n\n if (direction !== 'rtl') {\n return scrollLeft;\n }\n\n const type = detectScrollType();\n\n switch (type) {\n case 'negative':\n return element.scrollWidth - element.clientWidth + scrollLeft;\n\n case 'reverse':\n return element.scrollWidth - element.clientWidth - scrollLeft;\n\n default:\n return scrollLeft;\n }\n}","function easeInOutSin(time) {\n return (1 + Math.sin(Math.PI * time - Math.PI / 2)) / 2;\n}\n\nexport default function animate(property, element, to, options = {}, cb = () => {}) {\n const {\n ease = easeInOutSin,\n duration = 300 // standard\n\n } = options;\n let start = null;\n const from = element[property];\n let cancelled = false;\n\n const cancel = () => {\n cancelled = true;\n };\n\n const step = timestamp => {\n if (cancelled) {\n cb(new Error('Animation cancelled'));\n return;\n }\n\n if (start === null) {\n start = timestamp;\n }\n\n const time = Math.min(1, (timestamp - start) / duration);\n element[property] = ease(time) * (to - from) + from;\n\n if (time >= 1) {\n requestAnimationFrame(() => {\n cb(null);\n });\n return;\n }\n\n requestAnimationFrame(step);\n };\n\n if (from === to) {\n cb(new Error('Element already at target position'));\n return cancel;\n }\n\n requestAnimationFrame(step);\n return cancel;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onChange\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport debounce from '../utils/debounce';\nimport { ownerWindow } from '../utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst styles = {\n width: 99,\n height: 99,\n position: 'absolute',\n top: -9999,\n overflow: 'scroll'\n};\n/**\n * @ignore - internal component.\n * The component originates from https://github.com/STORIS/react-scrollbar-size.\n * It has been moved into the core in order to minimize the bundle size.\n */\n\nexport default function ScrollbarSize(props) {\n const {\n onChange\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const scrollbarHeight = React.useRef();\n const nodeRef = React.useRef(null);\n\n const setMeasurements = () => {\n scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;\n };\n\n React.useEffect(() => {\n const handleResize = debounce(() => {\n const prevHeight = scrollbarHeight.current;\n setMeasurements();\n\n if (prevHeight !== scrollbarHeight.current) {\n onChange(scrollbarHeight.current);\n }\n });\n const containerWindow = ownerWindow(nodeRef.current);\n containerWindow.addEventListener('resize', handleResize);\n return () => {\n handleResize.clear();\n containerWindow.removeEventListener('resize', handleResize);\n };\n }, [onChange]);\n React.useEffect(() => {\n setMeasurements();\n onChange(scrollbarHeight.current);\n }, [onChange]);\n return /*#__PURE__*/_jsx(\"div\", _extends({\n style: styles,\n ref: nodeRef\n }, other));\n}\nprocess.env.NODE_ENV !== \"production\" ? ScrollbarSize.propTypes = {\n onChange: PropTypes.func.isRequired\n} : void 0;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getTabScrollButtonUtilityClass(slot) {\n return generateUtilityClass('MuiTabScrollButton', slot);\n}\nconst tabScrollButtonClasses = generateUtilityClasses('MuiTabScrollButton', ['root', 'vertical', 'horizontal', 'disabled']);\nexport default tabScrollButtonClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\n\nvar _KeyboardArrowLeft, _KeyboardArrowRight;\n\nconst _excluded = [\"className\", \"direction\", \"orientation\", \"disabled\"];\n\n/* eslint-disable jsx-a11y/aria-role */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport KeyboardArrowLeft from '../internal/svg-icons/KeyboardArrowLeft';\nimport KeyboardArrowRight from '../internal/svg-icons/KeyboardArrowRight';\nimport ButtonBase from '../ButtonBase';\nimport useTheme from '../styles/useTheme';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled from '../styles/styled';\nimport tabScrollButtonClasses, { getTabScrollButtonUtilityClass } from './tabScrollButtonClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n orientation,\n disabled\n } = ownerState;\n const slots = {\n root: ['root', orientation, disabled && 'disabled']\n };\n return composeClasses(slots, getTabScrollButtonUtilityClass, classes);\n};\n\nconst TabScrollButtonRoot = styled(ButtonBase, {\n name: 'MuiTabScrollButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.orientation && styles[ownerState.orientation]];\n }\n})(({\n ownerState\n}) => _extends({\n width: 40,\n flexShrink: 0,\n opacity: 0.8,\n [`&.${tabScrollButtonClasses.disabled}`]: {\n opacity: 0\n }\n}, ownerState.orientation === 'vertical' && {\n width: '100%',\n height: 40,\n '& svg': {\n transform: `rotate(${ownerState.isRtl ? -90 : 90}deg)`\n }\n}));\nconst TabScrollButton = /*#__PURE__*/React.forwardRef(function TabScrollButton(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiTabScrollButton'\n });\n\n const {\n className,\n direction\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const theme = useTheme();\n const isRtl = theme.direction === 'rtl';\n\n const ownerState = _extends({\n isRtl\n }, props);\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(TabScrollButtonRoot, _extends({\n component: \"div\",\n className: clsx(classes.root, className),\n ref: ref,\n role: null,\n ownerState: ownerState,\n tabIndex: null\n }, other, {\n children: direction === 'left' ? _KeyboardArrowLeft || (_KeyboardArrowLeft = /*#__PURE__*/_jsx(KeyboardArrowLeft, {\n fontSize: \"small\"\n })) : _KeyboardArrowRight || (_KeyboardArrowRight = /*#__PURE__*/_jsx(KeyboardArrowRight, {\n fontSize: \"small\"\n }))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? TabScrollButton.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The direction the button should indicate.\n */\n direction: PropTypes.oneOf(['left', 'right']).isRequired,\n\n /**\n * If `true`, the component is disabled.\n */\n disabled: PropTypes.bool,\n\n /**\n * The component orientation (layout flow direction).\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']).isRequired,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default TabScrollButton;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getTabsUtilityClass(slot) {\n return generateUtilityClass('MuiTabs', slot);\n}\nconst tabsClasses = generateUtilityClasses('MuiTabs', ['root', 'vertical', 'flexContainer', 'flexContainerVertical', 'centered', 'scroller', 'fixed', 'scrollableX', 'scrollableY', 'hideScrollbar', 'scrollButtons', 'scrollButtonsHideMobile', 'indicator']);\nexport default tabsClasses;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"aria-label\", \"aria-labelledby\", \"action\", \"centered\", \"children\", \"className\", \"component\", \"allowScrollButtonsMobile\", \"indicatorColor\", \"onChange\", \"orientation\", \"ScrollButtonComponent\", \"scrollButtons\", \"selectionFollowsFocus\", \"TabIndicatorProps\", \"TabScrollButtonProps\", \"textColor\", \"value\", \"variant\", \"visibleScrollbar\"];\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { refType } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport useTheme from '../styles/useTheme';\nimport debounce from '../utils/debounce';\nimport { getNormalizedScrollLeft, detectScrollType } from '../utils/scrollLeft';\nimport animate from '../internal/animate';\nimport ScrollbarSize from './ScrollbarSize';\nimport TabScrollButton from '../TabScrollButton';\nimport useEventCallback from '../utils/useEventCallback';\nimport tabsClasses, { getTabsUtilityClass } from './tabsClasses';\nimport ownerDocument from '../utils/ownerDocument';\nimport ownerWindow from '../utils/ownerWindow';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst nextItem = (list, item) => {\n if (list === item) {\n return list.firstChild;\n }\n\n if (item && item.nextElementSibling) {\n return item.nextElementSibling;\n }\n\n return list.firstChild;\n};\n\nconst previousItem = (list, item) => {\n if (list === item) {\n return list.lastChild;\n }\n\n if (item && item.previousElementSibling) {\n return item.previousElementSibling;\n }\n\n return list.lastChild;\n};\n\nconst moveFocus = (list, currentFocus, traversalFunction) => {\n let wrappedOnce = false;\n let nextFocus = traversalFunction(list, currentFocus);\n\n while (nextFocus) {\n // Prevent infinite loop.\n if (nextFocus === list.firstChild) {\n if (wrappedOnce) {\n return;\n }\n\n wrappedOnce = true;\n } // Same logic as useAutocomplete.js\n\n\n const nextFocusDisabled = nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true';\n\n if (!nextFocus.hasAttribute('tabindex') || nextFocusDisabled) {\n // Move to the next element.\n nextFocus = traversalFunction(list, nextFocus);\n } else {\n nextFocus.focus();\n return;\n }\n }\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n vertical,\n fixed,\n hideScrollbar,\n scrollableX,\n scrollableY,\n centered,\n scrollButtonsHideMobile,\n classes\n } = ownerState;\n const slots = {\n root: ['root', vertical && 'vertical'],\n scroller: ['scroller', fixed && 'fixed', hideScrollbar && 'hideScrollbar', scrollableX && 'scrollableX', scrollableY && 'scrollableY'],\n flexContainer: ['flexContainer', vertical && 'flexContainerVertical', centered && 'centered'],\n indicator: ['indicator'],\n scrollButtons: ['scrollButtons', scrollButtonsHideMobile && 'scrollButtonsHideMobile'],\n scrollableX: [scrollableX && 'scrollableX'],\n hideScrollbar: [hideScrollbar && 'hideScrollbar']\n };\n return composeClasses(slots, getTabsUtilityClass, classes);\n};\n\nconst TabsRoot = styled('div', {\n name: 'MuiTabs',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [{\n [`& .${tabsClasses.scrollButtons}`]: styles.scrollButtons\n }, {\n [`& .${tabsClasses.scrollButtons}`]: ownerState.scrollButtonsHideMobile && styles.scrollButtonsHideMobile\n }, styles.root, ownerState.vertical && styles.vertical];\n }\n})(({\n ownerState,\n theme\n}) => _extends({\n overflow: 'hidden',\n minHeight: 48,\n // Add iOS momentum scrolling for iOS < 13.0\n WebkitOverflowScrolling: 'touch',\n display: 'flex'\n}, ownerState.vertical && {\n flexDirection: 'column'\n}, ownerState.scrollButtonsHideMobile && {\n [`& .${tabsClasses.scrollButtons}`]: {\n [theme.breakpoints.down('sm')]: {\n display: 'none'\n }\n }\n}));\nconst TabsScroller = styled('div', {\n name: 'MuiTabs',\n slot: 'Scroller',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.scroller, ownerState.fixed && styles.fixed, ownerState.hideScrollbar && styles.hideScrollbar, ownerState.scrollableX && styles.scrollableX, ownerState.scrollableY && styles.scrollableY];\n }\n})(({\n ownerState\n}) => _extends({\n position: 'relative',\n display: 'inline-block',\n flex: '1 1 auto',\n whiteSpace: 'nowrap'\n}, ownerState.fixed && {\n overflowX: 'hidden',\n width: '100%'\n}, ownerState.hideScrollbar && {\n // Hide dimensionless scrollbar on MacOS\n scrollbarWidth: 'none',\n // Firefox\n '&::-webkit-scrollbar': {\n display: 'none' // Safari + Chrome\n\n }\n}, ownerState.scrollableX && {\n overflowX: 'auto',\n overflowY: 'hidden'\n}, ownerState.scrollableY && {\n overflowY: 'auto',\n overflowX: 'hidden'\n}));\nconst FlexContainer = styled('div', {\n name: 'MuiTabs',\n slot: 'FlexContainer',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.flexContainer, ownerState.vertical && styles.flexContainerVertical, ownerState.centered && styles.centered];\n }\n})(({\n ownerState\n}) => _extends({\n display: 'flex'\n}, ownerState.vertical && {\n flexDirection: 'column'\n}, ownerState.centered && {\n justifyContent: 'center'\n}));\nconst TabsIndicator = styled('span', {\n name: 'MuiTabs',\n slot: 'Indicator',\n overridesResolver: (props, styles) => styles.indicator\n})(({\n ownerState,\n theme\n}) => _extends({\n position: 'absolute',\n height: 2,\n bottom: 0,\n width: '100%',\n transition: theme.transitions.create()\n}, ownerState.indicatorColor === 'primary' && {\n backgroundColor: theme.palette.primary.main\n}, ownerState.indicatorColor === 'secondary' && {\n backgroundColor: theme.palette.secondary.main\n}, ownerState.vertical && {\n height: '100%',\n width: 2,\n right: 0\n}));\nconst TabsScrollbarSize = styled(ScrollbarSize, {\n name: 'MuiTabs',\n slot: 'ScrollbarSize'\n})({\n overflowX: 'auto',\n overflowY: 'hidden',\n // Hide dimensionless scrollbar on MacOS\n scrollbarWidth: 'none',\n // Firefox\n '&::-webkit-scrollbar': {\n display: 'none' // Safari + Chrome\n\n }\n});\nconst defaultIndicatorStyle = {};\nlet warnedOnceTabPresent = false;\nconst Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiTabs'\n });\n const theme = useTheme();\n const isRtl = theme.direction === 'rtl';\n\n const {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n action,\n centered = false,\n children: childrenProp,\n className,\n component = 'div',\n allowScrollButtonsMobile = false,\n indicatorColor = 'primary',\n onChange,\n orientation = 'horizontal',\n ScrollButtonComponent = TabScrollButton,\n scrollButtons = 'auto',\n selectionFollowsFocus,\n TabIndicatorProps = {},\n TabScrollButtonProps = {},\n textColor = 'primary',\n value,\n variant = 'standard',\n visibleScrollbar = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const scrollable = variant === 'scrollable';\n const vertical = orientation === 'vertical';\n const scrollStart = vertical ? 'scrollTop' : 'scrollLeft';\n const start = vertical ? 'top' : 'left';\n const end = vertical ? 'bottom' : 'right';\n const clientSize = vertical ? 'clientHeight' : 'clientWidth';\n const size = vertical ? 'height' : 'width';\n\n const ownerState = _extends({}, props, {\n component,\n allowScrollButtonsMobile,\n indicatorColor,\n orientation,\n vertical,\n scrollButtons,\n textColor,\n variant,\n visibleScrollbar,\n fixed: !scrollable,\n hideScrollbar: scrollable && !visibleScrollbar,\n scrollableX: scrollable && !vertical,\n scrollableY: scrollable && vertical,\n centered: centered && !scrollable,\n scrollButtonsHideMobile: !allowScrollButtonsMobile\n });\n\n const classes = useUtilityClasses(ownerState);\n\n if (process.env.NODE_ENV !== 'production') {\n if (centered && scrollable) {\n console.error('MUI: You can not use the `centered={true}` and `variant=\"scrollable\"` properties ' + 'at the same time on a `Tabs` component.');\n }\n }\n\n const [mounted, setMounted] = React.useState(false);\n const [indicatorStyle, setIndicatorStyle] = React.useState(defaultIndicatorStyle);\n const [displayScroll, setDisplayScroll] = React.useState({\n start: false,\n end: false\n });\n const [scrollerStyle, setScrollerStyle] = React.useState({\n overflow: 'hidden',\n scrollbarWidth: 0\n });\n const valueToIndex = new Map();\n const tabsRef = React.useRef(null);\n const tabListRef = React.useRef(null);\n\n const getTabsMeta = () => {\n const tabsNode = tabsRef.current;\n let tabsMeta;\n\n if (tabsNode) {\n const rect = tabsNode.getBoundingClientRect(); // create a new object with ClientRect class props + scrollLeft\n\n tabsMeta = {\n clientWidth: tabsNode.clientWidth,\n scrollLeft: tabsNode.scrollLeft,\n scrollTop: tabsNode.scrollTop,\n scrollLeftNormalized: getNormalizedScrollLeft(tabsNode, theme.direction),\n scrollWidth: tabsNode.scrollWidth,\n top: rect.top,\n bottom: rect.bottom,\n left: rect.left,\n right: rect.right\n };\n }\n\n let tabMeta;\n\n if (tabsNode && value !== false) {\n const children = tabListRef.current.children;\n\n if (children.length > 0) {\n const tab = children[valueToIndex.get(value)];\n\n if (process.env.NODE_ENV !== 'production') {\n if (!tab) {\n console.error([`MUI: The \\`value\\` provided to the Tabs component is invalid.`, `None of the Tabs' children match with \"${value}\".`, valueToIndex.keys ? `You can provide one of the following values: ${Array.from(valueToIndex.keys()).join(', ')}.` : null].join('\\n'));\n }\n }\n\n tabMeta = tab ? tab.getBoundingClientRect() : null;\n\n if (process.env.NODE_ENV !== 'production') {\n if (process.env.NODE_ENV !== 'test' && !warnedOnceTabPresent && tabMeta && tabMeta.width === 0 && tabMeta.height === 0) {\n tabsMeta = null;\n console.error(['MUI: The `value` provided to the Tabs component is invalid.', `The Tab with this \\`value\\` (\"${value}\") is not part of the document layout.`, \"Make sure the tab item is present in the document or that it's not `display: none`.\"].join('\\n'));\n warnedOnceTabPresent = true;\n }\n }\n }\n }\n\n return {\n tabsMeta,\n tabMeta\n };\n };\n\n const updateIndicatorState = useEventCallback(() => {\n const {\n tabsMeta,\n tabMeta\n } = getTabsMeta();\n let startValue = 0;\n let startIndicator;\n\n if (vertical) {\n startIndicator = 'top';\n\n if (tabMeta && tabsMeta) {\n startValue = tabMeta.top - tabsMeta.top + tabsMeta.scrollTop;\n }\n } else {\n startIndicator = isRtl ? 'right' : 'left';\n\n if (tabMeta && tabsMeta) {\n const correction = isRtl ? tabsMeta.scrollLeftNormalized + tabsMeta.clientWidth - tabsMeta.scrollWidth : tabsMeta.scrollLeft;\n startValue = (isRtl ? -1 : 1) * (tabMeta[startIndicator] - tabsMeta[startIndicator] + correction);\n }\n }\n\n const newIndicatorStyle = {\n [startIndicator]: startValue,\n // May be wrong until the font is loaded.\n [size]: tabMeta ? tabMeta[size] : 0\n }; // IE11 support, replace with Number.isNaN\n // eslint-disable-next-line no-restricted-globals\n\n if (isNaN(indicatorStyle[startIndicator]) || isNaN(indicatorStyle[size])) {\n setIndicatorStyle(newIndicatorStyle);\n } else {\n const dStart = Math.abs(indicatorStyle[startIndicator] - newIndicatorStyle[startIndicator]);\n const dSize = Math.abs(indicatorStyle[size] - newIndicatorStyle[size]);\n\n if (dStart >= 1 || dSize >= 1) {\n setIndicatorStyle(newIndicatorStyle);\n }\n }\n });\n\n const scroll = (scrollValue, {\n animation = true\n } = {}) => {\n if (animation) {\n animate(scrollStart, tabsRef.current, scrollValue, {\n duration: theme.transitions.duration.standard\n });\n } else {\n tabsRef.current[scrollStart] = scrollValue;\n }\n };\n\n const moveTabsScroll = delta => {\n let scrollValue = tabsRef.current[scrollStart];\n\n if (vertical) {\n scrollValue += delta;\n } else {\n scrollValue += delta * (isRtl ? -1 : 1); // Fix for Edge\n\n scrollValue *= isRtl && detectScrollType() === 'reverse' ? -1 : 1;\n }\n\n scroll(scrollValue);\n };\n\n const getScrollSize = () => {\n const containerSize = tabsRef.current[clientSize];\n let totalSize = 0;\n const children = Array.from(tabListRef.current.children);\n\n for (let i = 0; i < children.length; i += 1) {\n const tab = children[i];\n\n if (totalSize + tab[clientSize] > containerSize) {\n break;\n }\n\n totalSize += tab[clientSize];\n }\n\n return totalSize;\n };\n\n const handleStartScrollClick = () => {\n moveTabsScroll(-1 * getScrollSize());\n };\n\n const handleEndScrollClick = () => {\n moveTabsScroll(getScrollSize());\n }; // TODO Remove as browser support for hidding the scrollbar\n // with CSS improves.\n\n\n const handleScrollbarSizeChange = React.useCallback(scrollbarWidth => {\n setScrollerStyle({\n overflow: null,\n scrollbarWidth\n });\n }, []);\n\n const getConditionalElements = () => {\n const conditionalElements = {};\n conditionalElements.scrollbarSizeListener = scrollable ? /*#__PURE__*/_jsx(TabsScrollbarSize, {\n onChange: handleScrollbarSizeChange,\n className: clsx(classes.scrollableX, classes.hideScrollbar)\n }) : null;\n const scrollButtonsActive = displayScroll.start || displayScroll.end;\n const showScrollButtons = scrollable && (scrollButtons === 'auto' && scrollButtonsActive || scrollButtons === true);\n conditionalElements.scrollButtonStart = showScrollButtons ? /*#__PURE__*/_jsx(ScrollButtonComponent, _extends({\n orientation: orientation,\n direction: isRtl ? 'right' : 'left',\n onClick: handleStartScrollClick,\n disabled: !displayScroll.start\n }, TabScrollButtonProps, {\n className: clsx(classes.scrollButtons, TabScrollButtonProps.className)\n })) : null;\n conditionalElements.scrollButtonEnd = showScrollButtons ? /*#__PURE__*/_jsx(ScrollButtonComponent, _extends({\n orientation: orientation,\n direction: isRtl ? 'left' : 'right',\n onClick: handleEndScrollClick,\n disabled: !displayScroll.end\n }, TabScrollButtonProps, {\n className: clsx(classes.scrollButtons, TabScrollButtonProps.className)\n })) : null;\n return conditionalElements;\n };\n\n const scrollSelectedIntoView = useEventCallback(animation => {\n const {\n tabsMeta,\n tabMeta\n } = getTabsMeta();\n\n if (!tabMeta || !tabsMeta) {\n return;\n }\n\n if (tabMeta[start] < tabsMeta[start]) {\n // left side of button is out of view\n const nextScrollStart = tabsMeta[scrollStart] + (tabMeta[start] - tabsMeta[start]);\n scroll(nextScrollStart, {\n animation\n });\n } else if (tabMeta[end] > tabsMeta[end]) {\n // right side of button is out of view\n const nextScrollStart = tabsMeta[scrollStart] + (tabMeta[end] - tabsMeta[end]);\n scroll(nextScrollStart, {\n animation\n });\n }\n });\n const updateScrollButtonState = useEventCallback(() => {\n if (scrollable && scrollButtons !== false) {\n const {\n scrollTop,\n scrollHeight,\n clientHeight,\n scrollWidth,\n clientWidth\n } = tabsRef.current;\n let showStartScroll;\n let showEndScroll;\n\n if (vertical) {\n showStartScroll = scrollTop > 1;\n showEndScroll = scrollTop < scrollHeight - clientHeight - 1;\n } else {\n const scrollLeft = getNormalizedScrollLeft(tabsRef.current, theme.direction); // use 1 for the potential rounding error with browser zooms.\n\n showStartScroll = isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;\n showEndScroll = !isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;\n }\n\n if (showStartScroll !== displayScroll.start || showEndScroll !== displayScroll.end) {\n setDisplayScroll({\n start: showStartScroll,\n end: showEndScroll\n });\n }\n }\n });\n React.useEffect(() => {\n const handleResize = debounce(() => {\n updateIndicatorState();\n updateScrollButtonState();\n });\n const win = ownerWindow(tabsRef.current);\n win.addEventListener('resize', handleResize);\n let resizeObserver;\n\n if (typeof ResizeObserver !== 'undefined') {\n resizeObserver = new ResizeObserver(handleResize);\n Array.from(tabListRef.current.children).forEach(child => {\n resizeObserver.observe(child);\n });\n }\n\n return () => {\n handleResize.clear();\n win.removeEventListener('resize', handleResize);\n\n if (resizeObserver) {\n resizeObserver.disconnect();\n }\n };\n }, [updateIndicatorState, updateScrollButtonState]);\n const handleTabsScroll = React.useMemo(() => debounce(() => {\n updateScrollButtonState();\n }), [updateScrollButtonState]);\n React.useEffect(() => {\n return () => {\n handleTabsScroll.clear();\n };\n }, [handleTabsScroll]);\n React.useEffect(() => {\n setMounted(true);\n }, []);\n React.useEffect(() => {\n updateIndicatorState();\n updateScrollButtonState();\n });\n React.useEffect(() => {\n // Don't animate on the first render.\n scrollSelectedIntoView(defaultIndicatorStyle !== indicatorStyle);\n }, [scrollSelectedIntoView, indicatorStyle]);\n React.useImperativeHandle(action, () => ({\n updateIndicator: updateIndicatorState,\n updateScrollButtons: updateScrollButtonState\n }), [updateIndicatorState, updateScrollButtonState]);\n\n const indicator = /*#__PURE__*/_jsx(TabsIndicator, _extends({}, TabIndicatorProps, {\n className: clsx(classes.indicator, TabIndicatorProps.className),\n ownerState: ownerState,\n style: _extends({}, indicatorStyle, TabIndicatorProps.style)\n }));\n\n let childIndex = 0;\n const children = React.Children.map(childrenProp, child => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Tabs component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n const childValue = child.props.value === undefined ? childIndex : child.props.value;\n valueToIndex.set(childValue, childIndex);\n const selected = childValue === value;\n childIndex += 1;\n return /*#__PURE__*/React.cloneElement(child, _extends({\n fullWidth: variant === 'fullWidth',\n indicator: selected && !mounted && indicator,\n selected,\n selectionFollowsFocus,\n onChange,\n textColor,\n value: childValue\n }, childIndex === 1 && value === false && !child.props.tabIndex ? {\n tabIndex: 0\n } : {}));\n });\n\n const handleKeyDown = event => {\n const list = tabListRef.current;\n const currentFocus = ownerDocument(list).activeElement; // Keyboard navigation assumes that [role=\"tab\"] are siblings\n // though we might warn in the future about nested, interactive elements\n // as a a11y violation\n\n const role = currentFocus.getAttribute('role');\n\n if (role !== 'tab') {\n return;\n }\n\n let previousItemKey = orientation === 'horizontal' ? 'ArrowLeft' : 'ArrowUp';\n let nextItemKey = orientation === 'horizontal' ? 'ArrowRight' : 'ArrowDown';\n\n if (orientation === 'horizontal' && isRtl) {\n // swap previousItemKey with nextItemKey\n previousItemKey = 'ArrowRight';\n nextItemKey = 'ArrowLeft';\n }\n\n switch (event.key) {\n case previousItemKey:\n event.preventDefault();\n moveFocus(list, currentFocus, previousItem);\n break;\n\n case nextItemKey:\n event.preventDefault();\n moveFocus(list, currentFocus, nextItem);\n break;\n\n case 'Home':\n event.preventDefault();\n moveFocus(list, null, nextItem);\n break;\n\n case 'End':\n event.preventDefault();\n moveFocus(list, null, previousItem);\n break;\n\n default:\n break;\n }\n };\n\n const conditionalElements = getConditionalElements();\n return /*#__PURE__*/_jsxs(TabsRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref,\n as: component\n }, other, {\n children: [conditionalElements.scrollButtonStart, conditionalElements.scrollbarSizeListener, /*#__PURE__*/_jsxs(TabsScroller, {\n className: classes.scroller,\n ownerState: ownerState,\n style: {\n overflow: scrollerStyle.overflow,\n [vertical ? `margin${isRtl ? 'Left' : 'Right'}` : 'marginBottom']: visibleScrollbar ? undefined : -scrollerStyle.scrollbarWidth\n },\n ref: tabsRef,\n onScroll: handleTabsScroll,\n children: [/*#__PURE__*/_jsx(FlexContainer, {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-orientation\": orientation === 'vertical' ? 'vertical' : null,\n className: classes.flexContainer,\n ownerState: ownerState,\n onKeyDown: handleKeyDown,\n ref: tabListRef,\n role: \"tablist\",\n children: children\n }), mounted && indicator]\n }), conditionalElements.scrollButtonEnd]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Tabs.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Callback fired when the component mounts.\n * This is useful when you want to trigger an action programmatically.\n * It supports two actions: `updateIndicator()` and `updateScrollButtons()`\n *\n * @param {object} actions This object contains all possible actions\n * that can be triggered programmatically.\n */\n action: refType,\n\n /**\n * If `true`, the scroll buttons aren't forced hidden on mobile.\n * By default the scroll buttons are hidden on mobile and takes precedence over `scrollButtons`.\n * @default false\n */\n allowScrollButtonsMobile: PropTypes.bool,\n\n /**\n * The label for the Tabs as a string.\n */\n 'aria-label': PropTypes.string,\n\n /**\n * An id or list of ids separated by a space that label the Tabs.\n */\n 'aria-labelledby': PropTypes.string,\n\n /**\n * If `true`, the tabs are centered.\n * This prop is intended for large views.\n * @default false\n */\n centered: PropTypes.bool,\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * Determines the color of the indicator.\n * @default 'primary'\n */\n indicatorColor: PropTypes.oneOf(['primary', 'secondary']),\n\n /**\n * Callback fired when the value changes.\n *\n * @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.\n * @param {any} value We default to the index of the child (number)\n */\n onChange: PropTypes.func,\n\n /**\n * The component orientation (layout flow direction).\n * @default 'horizontal'\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * The component used to render the scroll buttons.\n * @default TabScrollButton\n */\n ScrollButtonComponent: PropTypes.elementType,\n\n /**\n * Determine behavior of scroll buttons when tabs are set to scroll:\n *\n * - `auto` will only present them when not all the items are visible.\n * - `true` will always present them.\n * - `false` will never present them.\n *\n * By default the scroll buttons are hidden on mobile.\n * This behavior can be disabled with `allowScrollButtonsMobile`.\n * @default 'auto'\n */\n scrollButtons: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOf(['auto', false, true]),\n\n /**\n * If `true` the selected tab changes on focus. Otherwise it only\n * changes on activation.\n */\n selectionFollowsFocus: PropTypes.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),\n\n /**\n * Props applied to the tab indicator element.\n * @default {}\n */\n TabIndicatorProps: PropTypes.object,\n\n /**\n * Props applied to the [`TabScrollButton`](/api/tab-scroll-button/) element.\n * @default {}\n */\n TabScrollButtonProps: PropTypes.object,\n\n /**\n * Determines the color of the `Tab`.\n * @default 'primary'\n */\n textColor: PropTypes.oneOf(['inherit', 'primary', 'secondary']),\n\n /**\n * The value of the currently selected `Tab`.\n * If you don't want any selected `Tab`, you can set this prop to `false`.\n */\n value: PropTypes.any,\n\n /**\n * Determines additional display behavior of the tabs:\n *\n * - `scrollable` will invoke scrolling properties and allow for horizontally\n * scrolling (or swiping) of the tab bar.\n * -`fullWidth` will make the tabs grow to use all the available space,\n * which should be used for small views, like on mobile.\n * - `standard` will render the default state.\n * @default 'standard'\n */\n variant: PropTypes.oneOf(['fullWidth', 'scrollable', 'standard']),\n\n /**\n * If `true`, the scrollbar is visible. It can be useful when displaying\n * a long vertical list of tabs.\n * @default false\n */\n visibleScrollbar: PropTypes.bool\n} : void 0;\nexport default Tabs;","import { generateUtilityClass, generateUtilityClasses } from '@mui/base';\nexport function getTabUtilityClass(slot) {\n return generateUtilityClass('MuiTab', slot);\n}\nconst tabClasses = generateUtilityClasses('MuiTab', ['root', 'labelIcon', 'textColorInherit', 'textColorPrimary', 'textColorSecondary', 'selected', 'disabled', 'fullWidth', 'wrapped', 'iconWrapper']);\nexport default tabClasses;","/* tslint:disable */\n/* eslint-disable */\n// Generated using typescript-generator version 3.2.1263 on 2024-03-14 10:52:09.\n\nexport interface Adress {\n /**\n * Gatuadress\n */\n gata: string;\n /**\n * Lägenhetsnummer\n */\n lagenhetsnummer: string;\n /**\n * Postnummer\n */\n postnummer: string;\n /**\n * Postort\n */\n postort: string;\n}\n\nexport interface BostadAutocompleteDto {\n id: number;\n text: string;\n kommun: string;\n postort: string;\n lagenhetsnummer: string;\n selectable: boolean;\n}\n\nexport interface BostadsinformationDto {\n id: number;\n adress: string;\n lagenhetsnummer: string;\n kommun: string;\n postort: string;\n postnummer: string;\n boarea: number;\n antalRum: number;\n byggar: number;\n bostadstyp: Bostadstyp;\n sweref99x: number;\n sweref99y: number;\n agandeform: Agandeform;\n kallTyp: KallTyp;\n}\n\nexport interface BostadsvarderingDto\n extends RepresentationModel {\n /**\n * Id för bostadsvärderingen.\n */\n id: string;\n /**\n * Tidpunkt när värderingen skapades.\n */\n skapadTidpunkt: DateAsString;\n /**\n * Tidpunkt när värderingen uppdaterades.\n */\n uppdateradTidpunkt: DateAsString;\n /**\n * Kundmarken för värderingen.\n */\n kundmarke: string;\n vardering: Vardering;\n parametrar: VarderingParametrarDto;\n adress: Adress;\n referensforsaljningar: Referensforsaljning[];\n omvardering: Omvardering;\n}\n\nexport interface Omvardering {\n /**\n * Antal omvärderingar.\n */\n antalOmvarderingar: number;\n /**\n * Maximalt antal omvärderingar.\n */\n maxAntalOmvarderingar: number;\n /**\n * Tidpunkt när omvärderingen kan genomföras till.\n */\n kanOmvarderasTill: DateAsString;\n}\n\nexport interface Referensforsaljning {\n /**\n * Adress för referensförsäljningen.\n */\n adress: string;\n /**\n * Antal rum i referensförsäljningen.\n */\n antalRum: number;\n /**\n * Boarea i referensförsäljningen.\n */\n boarea: number;\n /**\n * Biarea i referensförsäljningen.\n */\n biarea: number;\n /**\n * Tomtarea i referensförsäljningen.\n */\n tomtarea: number;\n /**\n * Genomsnittlig avgift i referensförsäljningen.\n */\n avgift: number;\n /**\n * Våning i referensförsäljningen.\n */\n vaning: number;\n /**\n * Antal våningar i referensförsäljningen.\n */\n antalVaningar: number;\n /**\n * År då referensförsäljningen byggdes.\n */\n byggar: number;\n /**\n * Pris för referensförsäljningen.\n */\n pris: number;\n /**\n * Pris per kvadratmeter för referensförsäljningen.\n */\n prisPerKvm: number;\n /**\n * Aktuellt pris för referensförsäljningen.\n */\n prisIdag: number;\n /**\n * Aktuellt pris per kvadratmeter för referensförsäljningen.\n */\n prisIdagPerKvm: number;\n /**\n * Datum för referensförsäljningen.\n */\n datum: DateAsString;\n}\n\nexport interface Vardering {\n /**\n * Värdering.\n */\n vardering: number;\n /**\n * Kvalitet.\n */\n kvalitet: number;\n /**\n * Tidpunkt för värderingen.\n */\n tidpunkt: DateAsString;\n}\n\nexport interface VarderingParametrarDto {\n /**\n * Unik identifierare för värderingsparametrarna.\n */\n id: string;\n adress: Adress;\n /**\n * X-koordinat (SWEREF99 TM).\n */\n sweref99x: number;\n /**\n * Y-koordinat (SWEREF99 TM).\n */\n sweref99y: number;\n kategori: Kategori;\n /**\n * Antal rum.\n */\n antalRum: number;\n /**\n * Boarea.\n */\n boarea: number;\n /**\n * Biarea.\n */\n biarea: number;\n /**\n * Tomtarea.\n */\n tomtarea: number;\n /**\n * Byggår.\n */\n byggar: number;\n /**\n * Avgift.\n */\n avgift: number;\n /**\n * Våning.\n */\n vaning: number;\n /**\n * Antal våningar.\n */\n antalVaningar: number;\n /**\n * Standardpoäng.\n */\n standardpoang: number;\n}\n\nexport interface Links {}\n\nexport interface RepresentationModel {\n links: Links;\n}\n\nexport type DateAsString = string;\n\nexport const enum Agandeform {\n hyresrätt = 'HYRESRÄTT',\n tomträtt = 'TOMTRÄTT',\n bostadsrätt = 'BOSTADSRÄTT',\n okänd = 'OKÄND',\n äganderätt = 'AGANDERATT',\n}\n\nexport const enum Bostadstyp {\n LAGENHET = 'LÄGENHET',\n OKAND = 'OKÄND',\n LANTBRUK_OVRIGA = 'LANTBRUK_ÖVRIGA',\n VILLA = 'VILLA',\n RADHUS = 'RADHUS',\n KEDJEHUS = 'KEDJEHUS',\n LANTBRUK = 'LANTBRUK',\n SMAHUS_OVRIGA = 'SMÅHUS_ÖVRIGA',\n}\n\nexport const enum KallTyp {\n BOSTADSREGISTER = 'BOSTADSREGISTER',\n GEOKODNINGSTJANST = 'GEOKODNINGSTJANST',\n}\n\nexport const enum Kategori {\n SMAHUS = 'SMAHUS',\n BOSTADSRATT = 'BOSTADSRATT',\n}\n\nexport const enum ValidationText {\n NOT_NULL = 'NOT_NULL',\n WRONG_FORMAT = 'WRONG_FORMAT',\n MIN_VALUE = 'MIN_VALUE',\n MUST_BE_POSITIVE_OR_ZERO = 'MUST_BE_POSITIVE_OR_ZERO',\n MUST_BE_POSITIVE = 'MUST_BE_POSITIVE',\n MAX_VALUE = 'MAX_VALUE',\n BOAREA = 'BOAREA',\n BIAREA = 'BIAREA',\n TOMTAREA = 'TOMTAREA',\n AVGIFT = 'AVGIFT',\n ANTAL_VANINGAR = 'ANTAL_VANINGAR',\n STANDARDPOANG = 'STANDARDPOANG',\n BYGGAR = 'BYGGAR',\n SWEREF99X = 'SWEREF99X',\n SWEREF99Y = 'SWEREF99Y',\n KATEGORI = 'KATEGORI',\n ANTAL_RUM = 'ANTAL_RUM',\n GATA = 'GATA',\n POSTRORT = 'POSTRORT',\n POSTNUMMER = 'POSTNUMMER',\n}\n","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"disabled\", \"disableFocusRipple\", \"fullWidth\", \"icon\", \"iconPosition\", \"indicator\", \"label\", \"onChange\", \"onClick\", \"onFocus\", \"selected\", \"selectionFollowsFocus\", \"textColor\", \"value\", \"wrapped\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport ButtonBase from '../ButtonBase';\nimport capitalize from '../utils/capitalize';\nimport useThemeProps from '../styles/useThemeProps';\nimport styled from '../styles/styled';\nimport unsupportedProp from '../utils/unsupportedProp';\nimport tabClasses, { getTabUtilityClass } from './tabClasses';\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n textColor,\n fullWidth,\n wrapped,\n icon,\n label,\n selected,\n disabled\n } = ownerState;\n const slots = {\n root: ['root', icon && label && 'labelIcon', `textColor${capitalize(textColor)}`, fullWidth && 'fullWidth', wrapped && 'wrapped', selected && 'selected', disabled && 'disabled'],\n iconWrapper: ['iconWrapper']\n };\n return composeClasses(slots, getTabUtilityClass, classes);\n};\n\nconst TabRoot = styled(ButtonBase, {\n name: 'MuiTab',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.label && ownerState.icon && styles.labelIcon, styles[`textColor${capitalize(ownerState.textColor)}`], ownerState.fullWidth && styles.fullWidth, ownerState.wrapped && styles.wrapped];\n }\n})(({\n theme,\n ownerState\n}) => _extends({}, theme.typography.button, {\n maxWidth: 360,\n minWidth: 90,\n position: 'relative',\n minHeight: 48,\n flexShrink: 0,\n padding: '12px 16px',\n overflow: 'hidden',\n whiteSpace: 'normal',\n textAlign: 'center'\n}, ownerState.label && {\n flexDirection: ownerState.iconPosition === 'top' || ownerState.iconPosition === 'bottom' ? 'column' : 'row'\n}, {\n lineHeight: 1.25\n}, ownerState.icon && ownerState.label && {\n minHeight: 72,\n paddingTop: 9,\n paddingBottom: 9,\n [`& > .${tabClasses.iconWrapper}`]: _extends({}, ownerState.iconPosition === 'top' && {\n marginBottom: 6\n }, ownerState.iconPosition === 'bottom' && {\n marginTop: 6\n }, ownerState.iconPosition === 'start' && {\n marginRight: theme.spacing(1)\n }, ownerState.iconPosition === 'end' && {\n marginLeft: theme.spacing(1)\n })\n}, ownerState.textColor === 'inherit' && {\n color: 'inherit',\n opacity: 0.6,\n // same opacity as theme.palette.text.secondary\n [`&.${tabClasses.selected}`]: {\n opacity: 1\n },\n [`&.${tabClasses.disabled}`]: {\n opacity: theme.palette.action.disabledOpacity\n }\n}, ownerState.textColor === 'primary' && {\n color: theme.palette.text.secondary,\n [`&.${tabClasses.selected}`]: {\n color: theme.palette.primary.main\n },\n [`&.${tabClasses.disabled}`]: {\n color: theme.palette.text.disabled\n }\n}, ownerState.textColor === 'secondary' && {\n color: theme.palette.text.secondary,\n [`&.${tabClasses.selected}`]: {\n color: theme.palette.secondary.main\n },\n [`&.${tabClasses.disabled}`]: {\n color: theme.palette.text.disabled\n }\n}, ownerState.fullWidth && {\n flexShrink: 1,\n flexGrow: 1,\n flexBasis: 0,\n maxWidth: 'none'\n}, ownerState.wrapped && {\n fontSize: theme.typography.pxToRem(12)\n}));\nconst Tab = /*#__PURE__*/React.forwardRef(function Tab(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiTab'\n });\n\n const {\n className,\n disabled = false,\n disableFocusRipple = false,\n // eslint-disable-next-line react/prop-types\n fullWidth,\n icon: iconProp,\n iconPosition = 'top',\n // eslint-disable-next-line react/prop-types\n indicator,\n label,\n onChange,\n onClick,\n onFocus,\n // eslint-disable-next-line react/prop-types\n selected,\n // eslint-disable-next-line react/prop-types\n selectionFollowsFocus,\n // eslint-disable-next-line react/prop-types\n textColor = 'inherit',\n value,\n wrapped = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n disabled,\n disableFocusRipple,\n selected,\n icon: !!iconProp,\n iconPosition,\n label: !!label,\n fullWidth,\n textColor,\n wrapped\n });\n\n const classes = useUtilityClasses(ownerState);\n const icon = iconProp && label && /*#__PURE__*/React.isValidElement(iconProp) ? /*#__PURE__*/React.cloneElement(iconProp, {\n className: clsx(classes.iconWrapper, iconProp.props.className)\n }) : iconProp;\n\n const handleClick = event => {\n if (!selected && onChange) {\n onChange(event, value);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n const handleFocus = event => {\n if (selectionFollowsFocus && !selected && onChange) {\n onChange(event, value);\n }\n\n if (onFocus) {\n onFocus(event);\n }\n };\n\n return /*#__PURE__*/_jsxs(TabRoot, _extends({\n focusRipple: !disableFocusRipple,\n className: clsx(classes.root, className),\n ref: ref,\n role: \"tab\",\n \"aria-selected\": selected,\n disabled: disabled,\n onClick: handleClick,\n onFocus: handleFocus,\n ownerState: ownerState,\n tabIndex: selected ? 0 : -1\n }, other, {\n children: [iconPosition === 'top' || iconPosition === 'start' ? /*#__PURE__*/_jsxs(React.Fragment, {\n children: [icon, label]\n }) : /*#__PURE__*/_jsxs(React.Fragment, {\n children: [label, icon]\n }), indicator]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Tab.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop isn't supported.\n * Use the `component` prop if you need to change the children structure.\n */\n children: unsupportedProp,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n\n /**\n * If `true`, the keyboard focus ripple is disabled.\n * @default false\n */\n disableFocusRipple: PropTypes.bool,\n\n /**\n * If `true`, the ripple effect is disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: PropTypes.bool,\n\n /**\n * The icon to display.\n */\n icon: PropTypes.oneOfType([PropTypes.element, PropTypes.string]),\n\n /**\n * The position of the icon relative to the label.\n * @default 'top'\n */\n iconPosition: PropTypes.oneOf(['bottom', 'end', 'start', 'top']),\n\n /**\n * The label element.\n */\n label: PropTypes.node,\n\n /**\n * @ignore\n */\n onChange: PropTypes.func,\n\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),\n\n /**\n * You can provide your own value. Otherwise, we fallback to the child position index.\n */\n value: PropTypes.any,\n\n /**\n * Tab labels appear in a single row.\n * They can use a second line if needed.\n * @default false\n */\n wrapped: PropTypes.bool\n} : void 0;\nexport default Tab;","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"absolute\", \"children\", \"className\", \"component\", \"flexItem\", \"light\", \"orientation\", \"role\", \"textAlign\", \"variant\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/base';\nimport { alpha } from '@mui/system';\nimport styled from '../styles/styled';\nimport useThemeProps from '../styles/useThemeProps';\nimport { getDividerUtilityClass } from './dividerClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n\nconst useUtilityClasses = ownerState => {\n const {\n absolute,\n children,\n classes,\n flexItem,\n light,\n orientation,\n textAlign,\n variant\n } = ownerState;\n const slots = {\n root: ['root', absolute && 'absolute', variant, light && 'light', orientation === 'vertical' && 'vertical', flexItem && 'flexItem', children && 'withChildren', children && orientation === 'vertical' && 'withChildrenVertical', textAlign === 'right' && orientation !== 'vertical' && 'textAlignRight', textAlign === 'left' && orientation !== 'vertical' && 'textAlignLeft'],\n wrapper: ['wrapper', orientation === 'vertical' && 'wrapperVertical']\n };\n return composeClasses(slots, getDividerUtilityClass, classes);\n};\n\nconst DividerRoot = styled('div', {\n name: 'MuiDivider',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.absolute && styles.absolute, styles[ownerState.variant], ownerState.light && styles.light, ownerState.orientation === 'vertical' && styles.vertical, ownerState.flexItem && styles.flexItem, ownerState.children && styles.withChildren, ownerState.children && ownerState.orientation === 'vertical' && styles.withChildrenVertical, ownerState.textAlign === 'right' && ownerState.orientation !== 'vertical' && styles.textAlignRight, ownerState.textAlign === 'left' && ownerState.orientation !== 'vertical' && styles.textAlignLeft];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n margin: 0,\n // Reset browser default style.\n flexShrink: 0,\n borderWidth: 0,\n borderStyle: 'solid',\n borderColor: theme.palette.divider,\n borderBottomWidth: 'thin'\n}, ownerState.absolute && {\n position: 'absolute',\n bottom: 0,\n left: 0,\n width: '100%'\n}, ownerState.light && {\n borderColor: alpha(theme.palette.divider, 0.08)\n}, ownerState.variant === 'inset' && {\n marginLeft: 72\n}, ownerState.variant === 'middle' && ownerState.orientation === 'horizontal' && {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2)\n}, ownerState.variant === 'middle' && ownerState.orientation === 'vertical' && {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n}, ownerState.orientation === 'vertical' && {\n height: '100%',\n borderBottomWidth: 0,\n borderRightWidth: 'thin'\n}, ownerState.flexItem && {\n alignSelf: 'stretch',\n height: 'auto'\n}), ({\n theme,\n ownerState\n}) => _extends({}, ownerState.children && {\n display: 'flex',\n whiteSpace: 'nowrap',\n textAlign: 'center',\n border: 0,\n '&::before, &::after': {\n position: 'relative',\n width: '100%',\n borderTop: `thin solid ${theme.palette.divider}`,\n top: '50%',\n content: '\"\"',\n transform: 'translateY(50%)'\n }\n}), ({\n theme,\n ownerState\n}) => _extends({}, ownerState.children && ownerState.orientation === 'vertical' && {\n flexDirection: 'column',\n '&::before, &::after': {\n height: '100%',\n top: '0%',\n left: '50%',\n borderTop: 0,\n borderLeft: `thin solid ${theme.palette.divider}`,\n transform: 'translateX(0%)'\n }\n}), ({\n ownerState\n}) => _extends({}, ownerState.textAlign === 'right' && ownerState.orientation !== 'vertical' && {\n '&::before': {\n width: '90%'\n },\n '&::after': {\n width: '10%'\n }\n}, ownerState.textAlign === 'left' && ownerState.orientation !== 'vertical' && {\n '&::before': {\n width: '10%'\n },\n '&::after': {\n width: '90%'\n }\n}));\nconst DividerWrapper = styled('span', {\n name: 'MuiDivider',\n slot: 'Wrapper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.wrapper, ownerState.orientation === 'vertical' && styles.wrapperVertical];\n }\n})(({\n theme,\n ownerState\n}) => _extends({\n display: 'inline-block',\n paddingLeft: `calc(${theme.spacing(1)} * 1.2)`,\n paddingRight: `calc(${theme.spacing(1)} * 1.2)`\n}, ownerState.orientation === 'vertical' && {\n paddingTop: `calc(${theme.spacing(1)} * 1.2)`,\n paddingBottom: `calc(${theme.spacing(1)} * 1.2)`\n}));\nconst Divider = /*#__PURE__*/React.forwardRef(function Divider(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDivider'\n });\n\n const {\n absolute = false,\n children,\n className,\n component = children ? 'div' : 'hr',\n flexItem = false,\n light = false,\n orientation = 'horizontal',\n role = component !== 'hr' ? 'separator' : undefined,\n textAlign = 'center',\n variant = 'fullWidth'\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n const ownerState = _extends({}, props, {\n absolute,\n component,\n flexItem,\n light,\n orientation,\n role,\n textAlign,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(DividerRoot, _extends({\n as: component,\n className: clsx(classes.root, className),\n role: role,\n ref: ref,\n ownerState: ownerState\n }, other, {\n children: children ? /*#__PURE__*/_jsx(DividerWrapper, {\n className: classes.wrapper,\n ownerState: ownerState,\n children: children\n }) : null\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? Divider.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Absolutely position the element.\n * @default false\n */\n absolute: PropTypes.bool,\n\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n\n /**\n * @ignore\n */\n className: PropTypes.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n\n /**\n * If `true`, a vertical divider will have the correct height when used in flex container.\n * (By default, a vertical divider will have a calculated height of `0px` if it is the child of a flex container.)\n * @default false\n */\n flexItem: PropTypes.bool,\n\n /**\n * If `true`, the divider will have a lighter color.\n * @default false\n */\n light: PropTypes.bool,\n\n /**\n * The component orientation.\n * @default 'horizontal'\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n\n /**\n * @ignore\n */\n role: PropTypes\n /* @typescript-to-proptypes-ignore */\n .string,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object])), PropTypes.func, PropTypes.object]),\n\n /**\n * The text alignment.\n * @default 'center'\n */\n textAlign: PropTypes.oneOf(['center', 'left', 'right']),\n\n /**\n * The variant to use.\n * @default 'fullWidth'\n */\n variant: PropTypes\n /* @typescript-to-proptypes-ignore */\n .oneOfType([PropTypes.oneOf(['fullWidth', 'inset', 'middle']), PropTypes.string])\n} : void 0;\nexport default Divider;","import {\n Kategori,\n Agandeform,\n BostadsvarderingDto,\n BostadsinformationDto,\n} from '../types/dtos/VarderingarModel';\n\nconst kategoriToAgandeform = (kategori: Kategori): Agandeform =>\n kategori === Kategori.BOSTADSRATT\n ? Agandeform.bostadsrätt\n : Agandeform.äganderätt;\n\nexport const varderingToBostadsinformation = (\n vardering: BostadsvarderingDto\n): BostadsinformationDto => ({\n id: undefined,\n adress: vardering?.adress?.gata,\n lagenhetsnummer: vardering?.adress?.lagenhetsnummer,\n kommun: '',\n postort: vardering?.adress?.postort,\n postnummer: vardering?.adress?.postnummer,\n boarea: vardering?.parametrar?.boarea,\n antalRum: vardering?.parametrar?.antalRum,\n byggar: vardering?.parametrar?.byggar,\n bostadstyp: undefined,\n sweref99x: vardering?.parametrar?.sweref99x,\n sweref99y: vardering?.parametrar?.sweref99y,\n agandeform: kategoriToAgandeform(vardering?.parametrar?.kategori),\n kallTyp: undefined,\n});\n","export enum TriState {\n True = 'true',\n False = 'false',\n Mixed = 'mixed',\n}\n","export const formatPostnummer = (postnummer: string): string =>\n postnummer.length === 5\n ? `${postnummer.substring(0, 3)} ${postnummer.substring(3, 5)}`\n : postnummer;\n","import { formatPostnummer } from '../../common/lib/formatPostnummer';\nimport { Adress } from '../types/dtos/VarderingarModel';\n\nexport const createAdressLine = (adress: Adress): string =>\n adress\n ? `${adress.gata} ${\n adress.lagenhetsnummer ? ` lgh ${adress.lagenhetsnummer}` : ''\n }, ${formatPostnummer(adress.postnummer)} ${adress.postort}`\n : 'Adress saknas';\n\nexport const createAdressLines = (adress: Adress): string[] =>\n adress\n ? [\n adress.lagenhetsnummer\n ? `${adress.gata} lgh ${adress.lagenhetsnummer}`\n : adress.gata,\n `${formatPostnummer(adress.postnummer)} ${adress.postort}`,\n ]\n : ['Adress saknas'];\n","import { Checkbox, TableCell, TableRow } from '@mui/material';\nimport { formatSwedishDateTime } from '../../../common/lib/formatSwedishDateTime';\nimport { createAdressLine } from '../../lib/createAdressLine';\nimport { BostadsvarderingDto } from '../../types/dtos/VarderingarModel';\n\ninterface SavedVarderingarTableRowProps {\n selectBostadsvardering: (bostadsvardering: BostadsvarderingDto) => void;\n handleCheckboxClick: (bostadsvardering: BostadsvarderingDto) => void;\n rowData: BostadsvarderingDto;\n isItemSelected: boolean;\n isItemActive: boolean;\n}\n\nexport const SavedVarderingarTableRow: React.FC<\n SavedVarderingarTableRowProps\n> = ({\n selectBostadsvardering,\n handleCheckboxClick,\n rowData,\n isItemSelected,\n isItemActive,\n}) => (\n selectBostadsvardering(rowData)}\n tabIndex={-1}\n key={rowData.id}\n selected={isItemActive}\n sx={{\n cursor: 'default',\n }}\n >\n \n {\n e.preventDefault();\n e.stopPropagation();\n handleCheckboxClick(rowData);\n }}\n checked={isItemSelected}\n />\n \n {createAdressLine(rowData.adress)}\n {formatSwedishDateTime(rowData.uppdateradTidpunkt)}\n {rowData.kundmarke}\n \n);\n","import {\n Checkbox,\n Table,\n TableBody,\n TableCell,\n TableContainer,\n TableFooter,\n TableHead,\n TablePagination,\n TableRow,\n} from '@mui/material';\nimport React, { useState } from 'react';\nimport { TriState } from '../../types/TriState';\nimport { SavedVarderingarTableRow } from './SavedVarderingarTableRow';\nimport { BostadsvarderingDto } from '../../types/dtos/VarderingarModel';\n\nconst createEmptyRows = (\n page: number,\n rowsPerPage: number,\n rowCount = 0,\n rowHeight = 33\n): JSX.Element => {\n const numEmptyRows = Math.max(0, (1 + page) * rowsPerPage - rowCount);\n return numEmptyRows > 0 ? (\n \n \n \n ) : (\n <>>\n );\n};\n\ninterface SavedVarderingarTableProps {\n savedVarderingar: BostadsvarderingDto[];\n handleSelectAll: (checked: boolean) => void;\n selected: BostadsvarderingDto[];\n setActiveBostadsvardering: (bostadsvardering: BostadsvarderingDto) => void;\n activeBostadsvardering: BostadsvarderingDto;\n toggleRowSelect: (bostadsvardering: BostadsvarderingDto) => void;\n}\n\nexport const SavedVarderingarTable: React.FC = ({\n savedVarderingar,\n handleSelectAll,\n selected,\n setActiveBostadsvardering,\n activeBostadsvardering,\n toggleRowSelect,\n}) => {\n const [page, setPage] = useState(0);\n\n const rowsPerPage = 15;\n const numSelected = selected?.length || 0;\n const selectionState =\n numSelected > 0 && numSelected < savedVarderingar.length\n ? TriState.Mixed\n : savedVarderingar.length > 0 && numSelected === savedVarderingar.length\n ? TriState.True\n : TriState.False;\n\n return (\n \n