({ initialTab: s, isExecute: o, schema: i, example: a })
| 35466 | ) |
| 35467 | } |
| 35468 | } |
| 35469 | const useTabs = ({ initialTab: s, isExecute: o, schema: i, example: a }) => { |
| 35470 | const u = (0, Re.useMemo)(() => ({ example: 'example', model: 'model' }), []), |
| 35471 | _ = (0, Re.useMemo)(() => Object.keys(u), [u]).includes(s) && i && !o ? s : u.example, |
| 35472 | w = ((s) => { |
| 35473 | const o = (0, Re.useRef)() |
| 35474 | return ( |
| 35475 | (0, Re.useEffect)(() => { |
| 35476 | o.current = s |
| 35477 | }), |
| 35478 | o.current |
| 35479 | ) |
| 35480 | })(o), |
| 35481 | [x, C] = (0, Re.useState)(_), |
| 35482 | j = (0, Re.useCallback)((s) => { |
| 35483 | C(s.target.dataset.name) |
| 35484 | }, []) |
| 35485 | return ( |
| 35486 | (0, Re.useEffect)(() => { |
| 35487 | w && !o && a && C(u.example) |
| 35488 | }, [w, o, a]), |
| 35489 | { activeTab: x, onTabChange: j, tabs: u } |
| 35490 | ) |
| 35491 | }, |
| 35492 | model_example = ({ |
| 35493 | schema: s, |
no test coverage detected