{"version":3,"file":"/Users/anthonygubler/development/dojo-org/widgets/src/grid/Footer.tsx","sourceRoot":"","sources":["Footer.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,iCAAiC,CAAC;AACzD,OAAO,EAAE,CAAC,EAAE,MAAM,2BAA2B,CAAC;AAC9C,OAAO,SAAS,MAAM,kCAAkC,CAAC;AACzD,OAAO,WAAW,EAAE,EAAE,KAAK,EAAE,MAAM,oCAAoC,CAAC;AAGxE,OAAO,MAAM,MAAM,YAAY,CAAC;AAChC,OAAO,KAAK,GAAG,MAAM,oCAAoC,CAAC;AAY1D,IAAqB,MAAM,GAA3B,MAAqB,MAAO,SAAQ,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,CAAmB;IAC7E,MAAM;QACf,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC;QAClD,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAC/C,MAAM,MAAM,GACX,KAAK,KAAK,SAAS;YAClB,CAAC,CAAC,MAAM,CAAC,aAAa,EAAE;gBACtB,IAAI;gBACJ,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;gBACvC,SAAS,EAAE,KAAK;aACf,CAAC;YACJ,CAAC,CAAC,MAAM,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3C,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9D,CAAC;CACD,CAAA;AAdoB,MAAM;IAD1B,KAAK,CAAC,GAAG,CAAC;GACU,MAAM,CAc1B;eAdoB,MAAM","sourcesContent":["import WidgetBase from '@dojo/framework/core/WidgetBase';\nimport { v } from '@dojo/framework/core/vdom';\nimport I18nMixin from '@dojo/framework/core/mixins/I18n';\nimport ThemedMixin, { theme } from '@dojo/framework/core/mixins/Themed';\nimport { DNode } from '@dojo/framework/core/interfaces';\n\nimport bundle from './nls/Grid';\nimport * as css from '../theme/default/grid-footer.m.css';\n\nexport interface FooterProperties {\n\t/** The total number of rows */\n\ttotal?: number;\n\t/** The current page */\n\tpage: number;\n\t/** The number of rows per page */\n\tpageSize: number;\n}\n\n@theme(css)\nexport default class Footer extends I18nMixin(ThemedMixin(WidgetBase))<FooterProperties> {\n\tprotected render(): DNode {\n\t\tconst { total, page, pageSize } = this.properties;\n\t\tconst { format } = this.localizeBundle(bundle);\n\t\tconst footer =\n\t\t\ttotal !== undefined\n\t\t\t\t? format('pageOfTotal', {\n\t\t\t\t\t\tpage,\n\t\t\t\t\t\ttotalPages: Math.ceil(total / pageSize),\n\t\t\t\t\t\ttotalRows: total\n\t\t\t\t  })\n\t\t\t\t: format('pageOfUnknownTotal', { page });\n\t\treturn v('div', { classes: this.theme(css.root) }, [footer]);\n\t}\n}\n"]}