{"version":3,"file":"y.mjs","names":["props: TrackYProps","p: TrackYProps"],"sources":["../../../src/components/track/y.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ViewProps } from \"react-native\";\n\nimport * as React from \"react\";\nimport { Animated, View } from \"react-native\";\n\nimport { useScrollCore } from \"#/contexts/scrollcore\";\nimport { getComponentProps } from \"#/functions/props\";\n\n/** Props for the `TrackY` component. */\ntype TrackYProps = ViewProps & {\n    ref?: React.Ref<View>;\n};\n\n/** Vertical track component. */\nconst TrackY = (props: TrackYProps): React.JSX.Element => {\n    const {\n        options: { disabled, animated, plugins },\n        x: { setHvTrack },\n    } = useScrollCore();\n\n    const p: TrackYProps = getComponentProps({\n        name: \"trackY\",\n        props,\n        plugins,\n    });\n\n    React.useEffect((): void => {\n        setHvTrack(true);\n    }, [\n        setHvTrack,\n    ]);\n\n    if (disabled) return <>{}</>;\n\n    if (animated) {\n        return (\n            <Animated.View\n                {...p}\n                ref={p.ref}\n            >\n                {p.children}\n            </Animated.View>\n        );\n    }\n\n    return (\n        <View\n            {...p}\n            ref={p.ref}\n        >\n            {p.children}\n        </View>\n    );\n};\n\nexport type { TrackYProps };\nexport { TrackY };\n"],"mappings":";;;;;;;;;;AAgBA,MAAM,SAAS,CAACA,UAA0C;CACtD,MAAM,EACF,SAAS,EAAE,UAAU,UAAU,SAAS,EACxC,GAAG,EAAE,YAAY,EACpB,GAAG,eAAe;CAEnB,MAAMC,IAAiB,kBAAkB;EACrC,MAAM;EACN;EACA;CACH,EAAC;CAEF,MAAM,UAAU,MAAY;EACxB,WAAW,KAAK;CACnB,GAAE,CACC,UACH,EAAC;AAEF,KAAI,SAAU,yCAAc;AAE5B,KAAI,SACA,4BACK,SAAS;EACN,GAAI;EACJ,KAAK,EAAE;YAEN,EAAE;GACS;AAIxB,4BACK;EACG,GAAI;EACJ,KAAK,EAAE;YAEN,EAAE;GACA;AAEd"}