{"size": 1576, "ext": "js", "max_stars_repo_path": "presentation/components/Slides/FunctionObjectCombo/contentContext.js", "max_stars_repo_name": "sag1v/OOP-Javascript-Presentation", "max_stars_repo_stars_event_min_datetime": "2019-04-02T00:46:07.000Z", "max_stars_repo_stars_event_max_datetime": "2019-11-25T05:26:07.000Z", "max_issues_repo_path": "presentation/components/Slides/FunctionObjectCombo/contentContext.js", "max_issues_repo_name": "sag1v/OOP-Javascript-Presentation", "max_issues_repo_issues_event_min_datetime": "2020-09-05T23:41:36.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T13:53:51.000Z", "max_forks_repo_path": "presentation/components/Slides/FunctionObjectCombo/contentContext.js", "max_forks_repo_name": "sag1v/OOP-Javascript-Presentation", "max_forks_repo_forks_event_min_datetime": "2019-04-02T00:46:10.000Z", "max_forks_repo_forks_event_max_datetime": "2019-04-16T06:16:14.000Z"}
{"max_stars_count": 4, "max_issues_count": 8, "max_forks_count": 2, "avg_line_length": 37.5238095238, "max_line_length": 113, "alphanum_fraction": 0.5063451777}
import React from 'react';
import uuidv4 from 'uuid/v4';
import Diagram from '../../Diagram';
import { addIf } from '../utils';

const ToRender = ({ empty, hideDouble, showCombo, showSomeProp, showPrototype }) => {
    return (
        <Diagram
            global
            hideExecutionContext
            memoryItems={empty ? [] : [
                ...addIf(
                    !hideDouble,
                    <Diagram.Func 
                        key={uuidv4()}
                        name="double"
                        hideObject={!showCombo}
                        isCombo={showCombo}
                        props={[
                            ...addIf(showPrototype, <Diagram.Obj name="prototype" hideProto/>),
                            ...addIf(showSomeProp, <Diagram.PrimitiveMemory name="someProp" value="Hi there!"/>),
                        ]} 
                            />
                )
            ]}
        />
    )
}


export default [
    { lineNumbers: '  ', render: <ToRender hideDouble /> },
    { lineNumbers: '1-3', render: <ToRender /> },
    { lineNumbers: '5', render: <ToRender /> },
    { lineNumbers: '5', render: <ToRender showCombo /> },
    { lineNumbers: '5', render: <ToRender showCombo showSomeProp /> },
    { lineNumbers: '7', render: <ToRender showCombo showSomeProp /> },
    { lineNumbers: '8', render: <ToRender showCombo showSomeProp /> },
    { lineNumbers: '10', render: <ToRender showCombo showSomeProp showPrototype /> },
    { lineNumbers: ' ', render: <ToRender showCombo showSomeProp showPrototype /> },

];