{"version":3,"file":"SchoolLogo-06aa7d42.js","sources":["../../src/App/SchoolLogo/SchoolLogo.tsx"],"sourcesContent":["import React from 'react';\r\nimport { useInstance } from 'react-ioc';\r\nimport { observer } from 'mobx-react';\r\nimport styles from './SchoolLogo.module.scss';\r\nimport { SchoolStore } from 'stores';\r\nimport { combineClasses, FileProvider } from '@axl/accel-framework/utils';\r\nimport { AccelLogo } from '@axl/accel-framework/components';\r\nimport { AppSettings } from 'models/app-settings';\r\n\r\ntype SchoolLogoProps = {\r\n theme?: 'light' | 'dark';\r\n className?: string;\r\n imageClassname?: string;\r\n height?: number;\r\n width?: number;\r\n}\r\n\r\nconst SchoolLogo: React.FC = ({ theme, height, width, className, imageClassname }) => {\r\n const store = useInstance(SchoolStore);\r\n const fileProvider = useInstance(FileProvider);\r\n const appSettings = useInstance(AppSettings);\r\n const [url] = React.useState(() => {\r\n return store.school.logo ? fileProvider.getUrl(store.school.logo) : appSettings.style.logoSrc ?? undefined;\r\n });\r\n\r\n return
\r\n {url\r\n ? \r\n : }\r\n
;\r\n}\r\nSchoolLogo.defaultProps = {\r\n theme: 'light',\r\n height: 40\r\n}\r\nexport default observer(SchoolLogo);"],"names":["SchoolLogo","theme","height","width","className","imageClassname","store","useInstance","SchoolStore","fileProvider","FileProvider","appSettings","AppSettings","url","React","_a","jsx","combineClasses","styles","AccelLogo","SchoolLogo$1","observer"],"mappings":"iMAiBMA,EAAwC,CAAC,CAAE,MAAAC,EAAO,OAAAC,EAAQ,MAAAC,EAAO,UAAAC,EAAW,eAAAC,KAAqB,CAC7F,MAAAC,EAAQC,EAAYC,CAAW,EAC/BC,EAAeF,EAAYG,CAAY,EACvCC,EAAcJ,EAAYK,CAAW,EACrC,CAACC,CAAG,EAAIC,EAAM,SAAS,IAAM,OACxB,OAAAR,EAAM,OAAO,KAAOG,EAAa,OAAOH,EAAM,OAAO,IAAI,GAAIS,EAAAJ,EAAY,MAAM,UAAlB,KAAAI,EAA6B,MAAA,CACpG,EAED,OAAQC,EAAAA,IAAA,MAAA,CAAI,UAAWC,EAAe,mBAAoBb,CAAS,EAC9D,SAAAS,EACMG,EAAAA,IAAA,MAAA,CAAI,IAAKH,EAAK,UAAWI,EAAeC,EAAO,YAAab,CAAc,EAAG,MAAO,CAAE,OAAAH,EAAQ,MAAAC,EAAS,CAAA,EACvGa,EAAAA,IAAAG,EAAA,CAAU,MAAAlB,EAAc,MAAAE,EAAc,OAAAD,EAAgB,CACjE,CAAA,CACJ,EACAF,EAAW,aAAe,CACtB,MAAO,QACP,OAAQ,EACZ,EACA,MAAeoB,EAAAC,EAASrB,CAAU"}