{"version":3,"file":"VToolbar-DVaUf5lN.js","sources":["../../node_modules/vuetify/lib/components/VToolbar/VToolbar.mjs"],"sourcesContent":["import { resolveDirective as _resolveDirective, createVNode as _createVNode } from \"vue\";\n// Styles\nimport \"./VToolbar.css\";\n\n// Components\nimport { VToolbarTitle } from \"./VToolbarTitle.mjs\";\nimport { VExpandTransition } from \"../transitions/index.mjs\";\nimport { VDefaultsProvider } from \"../VDefaultsProvider/index.mjs\";\nimport { VImg } from \"../VImg/index.mjs\"; // Composables\nimport { makeBorderProps, useBorder } from \"../../composables/border.mjs\";\nimport { useBackgroundColor } from \"../../composables/color.mjs\";\nimport { makeComponentProps } from \"../../composables/component.mjs\";\nimport { provideDefaults } from \"../../composables/defaults.mjs\";\nimport { makeElevationProps, useElevation } from \"../../composables/elevation.mjs\";\nimport { useRtl } from \"../../composables/locale.mjs\";\nimport { makeRoundedProps, useRounded } from \"../../composables/rounded.mjs\";\nimport { makeTagProps } from \"../../composables/tag.mjs\";\nimport { makeThemeProps, provideTheme } from \"../../composables/theme.mjs\"; // Utilities\nimport { computed, shallowRef, toRef } from 'vue';\nimport { convertToUnit, genericComponent, propsFactory, useRender } from \"../../util/index.mjs\"; // Types\nconst allowedDensities = [null, 'prominent', 'default', 'comfortable', 'compact'];\nexport const makeVToolbarProps = propsFactory({\n absolute: Boolean,\n collapse: Boolean,\n color: String,\n density: {\n type: String,\n default: 'default',\n validator: v => allowedDensities.includes(v)\n },\n extended: Boolean,\n extensionHeight: {\n type: [Number, String],\n default: 48\n },\n flat: Boolean,\n floating: Boolean,\n height: {\n type: [Number, String],\n default: 64\n },\n image: String,\n title: String,\n ...makeBorderProps(),\n ...makeComponentProps(),\n ...makeElevationProps(),\n ...makeRoundedProps(),\n ...makeTagProps({\n tag: 'header'\n }),\n ...makeThemeProps()\n}, 'VToolbar');\nexport const VToolbar = genericComponent()({\n name: 'VToolbar',\n props: makeVToolbarProps(),\n setup(props, _ref) {\n let {\n slots\n } = _ref;\n const {\n backgroundColorClasses,\n backgroundColorStyles\n } = useBackgroundColor(toRef(props, 'color'));\n const {\n borderClasses\n } = useBorder(props);\n const {\n elevationClasses\n } = useElevation(props);\n const {\n roundedClasses\n } = useRounded(props);\n const {\n themeClasses\n } = provideTheme(props);\n const {\n rtlClasses\n } = useRtl();\n const isExtended = shallowRef(!!(props.extended || slots.extension?.()));\n const contentHeight = computed(() => parseInt(Number(props.height) + (props.density === 'prominent' ? Number(props.height) : 0) - (props.density === 'comfortable' ? 8 : 0) - (props.density === 'compact' ? 16 : 0), 10));\n const extensionHeight = computed(() => isExtended.value ? parseInt(Number(props.extensionHeight) + (props.density === 'prominent' ? Number(props.extensionHeight) : 0) - (props.density === 'comfortable' ? 4 : 0) - (props.density === 'compact' ? 8 : 0), 10) : 0);\n provideDefaults({\n VBtn: {\n variant: 'text'\n }\n });\n useRender(() => {\n const hasTitle = !!(props.title || slots.title);\n const hasImage = !!(slots.image || props.image);\n const extension = slots.extension?.();\n isExtended.value = !!(props.extended || extension);\n return _createVNode(props.tag, {\n \"class\": ['v-toolbar', {\n 'v-toolbar--absolute': props.absolute,\n 'v-toolbar--collapse': props.collapse,\n 'v-toolbar--flat': props.flat,\n 'v-toolbar--floating': props.floating,\n [`v-toolbar--density-${props.density}`]: true\n }, backgroundColorClasses.value, borderClasses.value, elevationClasses.value, roundedClasses.value, themeClasses.value, rtlClasses.value, props.class],\n \"style\": [backgroundColorStyles.value, props.style]\n }, {\n default: () => [hasImage && _createVNode(\"div\", {\n \"key\": \"image\",\n \"class\": \"v-toolbar__image\"\n }, [!slots.image ? _createVNode(VImg, {\n \"key\": \"image-img\",\n \"cover\": true,\n \"src\": props.image\n }, null) : _createVNode(VDefaultsProvider, {\n \"key\": \"image-defaults\",\n \"disabled\": !props.image,\n \"defaults\": {\n VImg: {\n cover: true,\n src: props.image\n }\n }\n }, slots.image)]), _createVNode(VDefaultsProvider, {\n \"defaults\": {\n VTabs: {\n height: convertToUnit(contentHeight.value)\n }\n }\n }, {\n default: () => [_createVNode(\"div\", {\n \"class\": \"v-toolbar__content\",\n \"style\": {\n height: convertToUnit(contentHeight.value)\n }\n }, [slots.prepend && _createVNode(\"div\", {\n \"class\": \"v-toolbar__prepend\"\n }, [slots.prepend?.()]), hasTitle && _createVNode(VToolbarTitle, {\n \"key\": \"title\",\n \"text\": props.title\n }, {\n text: slots.title\n }), slots.default?.(), slots.append && _createVNode(\"div\", {\n \"class\": \"v-toolbar__append\"\n }, [slots.append?.()])])]\n }), _createVNode(VDefaultsProvider, {\n \"defaults\": {\n VTabs: {\n height: convertToUnit(extensionHeight.value)\n }\n }\n }, {\n default: () => [_createVNode(VExpandTransition, null, {\n default: () => [isExtended.value && _createVNode(\"div\", {\n \"class\": \"v-toolbar__extension\",\n \"style\": {\n height: convertToUnit(extensionHeight.value)\n }\n }, [extension])]\n })]\n })]\n });\n });\n return {\n contentHeight,\n extensionHeight\n };\n }\n});\n//# sourceMappingURL=VToolbar.mjs.map"],"names":["allowedDensities","makeVToolbarProps","propsFactory","v","makeBorderProps","makeComponentProps","makeElevationProps","makeRoundedProps","makeTagProps","makeThemeProps","VToolbar","genericComponent","props","_ref","slots","backgroundColorClasses","backgroundColorStyles","useBackgroundColor","toRef","borderClasses","useBorder","elevationClasses","useElevation","roundedClasses","useRounded","themeClasses","provideTheme","rtlClasses","useRtl","isExtended","shallowRef","_a","contentHeight","computed","extensionHeight","provideDefaults","useRender","hasTitle","hasImage","extension","_createVNode","VDefaultsProvider","VImg","convertToUnit","VToolbarTitle","_b","_c","VExpandTransition"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoBA,MAAMA,EAAmB,CAAC,KAAM,YAAa,UAAW,cAAe,SAAS,EACnEC,EAAoBC,EAAa,CAC5C,SAAU,QACV,SAAU,QACV,MAAO,OACP,QAAS,CACP,KAAM,OACN,QAAS,UACT,UAAWC,GAAKH,EAAiB,SAASG,CAAC,CAC5C,EACD,SAAU,QACV,gBA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