1/* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import {CommonMethod} from "./common"; 17 18export declare enum BarMode { 19 Scrollable, 20 Fixed 21} 22 23export declare enum BarPosition { 24 Start, 25 End 26} 27 28export declare class TabsController { 29 constructor(); 30 31 changeIndex(value: number): void; 32} 33 34export declare class TabsExtend<T> extends TabsAttribute<T> { 35} 36 37interface Tabs extends TabsAttribute<Tabs> { 38 (value?: { barPosition?: BarPosition, index?: number, controller?: TabsController }): Tabs; 39} 40 41declare class TabsAttribute<T> extends CommonMethod<T> { 42 vertical(value: boolean): T; 43 44 scrollable(value: boolean): T; 45 46 barMode(value: BarMode): T; 47 48 barWidth(value: number): T; 49 50 barHeight(value: number): T; 51 52 animationDuration(value: number): T; 53 54 onChange(event: (index: number) => void): T; 55} 56 57export declare const TabsInterface: Tabs; 58