def METHOD_NAME(layout, curves, name, data_type, domain):
    exists = curves.attributes.get(name) is not None
    col = layout.column()
    col.enabled = not exists
    col.operator_context = 'EXEC_DEFAULT'
    props = col.operator("geometry.attribute_add", text=name)
    props.name = name
    props.data_type = data_type
    props.domain = domain