function val = getEnableState(~, hParent, prop)
%GETENABLESTATE Get the enable state of the specified property widget.

%   Copyright 2008-2023 The MathWorks, Inc.
%     

val = false;
filtobj = hParent.filterObj;
archit = hParent.hArchit.Architecture;
% structuresForMultiClock = (strcmpi(archit, 'Fully parallel')||strcmpi(archit, 'Fully serial')||strcmpi(archit, 'Distributed arithmetic (DA)'));

switch prop
    case 'fracdelayport'
        val = fdhdlcoderui.isfarrow(filtobj);           
    case 'CastBeforeSum'
        if any(strcmpi(fieldnames(get(filtobj)),'Arithmetic')) && strcmpi(filtobj.arithmetic, 'fixed')
            if any(strcmpi(fieldnames(get(filtobj)),'CastBeforeSum'))
                val = ~isa(filtobj,'dsp.internal.mfilt.abstractcic');
            end
        end
    case 'ClockEnableOutputPort'
        switch archit
            case 'Fully parallel'
                val = isa(filtobj, 'mfilt.abstractmultirate') && ~isa(filtobj, 'dsp.internal.mfilt.farrowsrc');
            case 'Fully serial'
                val = isa(filtobj, 'dsp.internal.mfilt.firdecim') || isa(filtobj, 'dsp.internal.mfilt.firinterp');
            case 'Distributed arithmetic (DA)'
                val = isa(filtobj, 'dsp.internal.mfilt.firdecim');
            otherwise 
                val = false;
        end     
        if isa(filtobj, 'mfilt.abstractmultirate') 
            if val == true && strcmpi(hParent.CLIProperties.ClockInputs, 'single')
                val = true;
            else
                val = false;        
            end
        end

    case 'ClockInputs'    
        switch archit
            case 'Fully parallel'
                val = isa(filtobj, 'mfilt.abstractmultirate') && ~isa(filtobj, 'dsp.internal.mfilt.farrowsrc');
            case 'Fully serial'
                val = isa(filtobj, 'dsp.internal.mfilt.firdecim') || isa(filtobj, 'dsp.internal.mfilt.firinterp');
            case 'Partly serial'
                val = isa(filtobj, 'dsp.internal.mfilt.firdecim');                
            case 'Distributed arithmetic (DA)'
                val = isa(filtobj, 'dsp.internal.mfilt.firdecim');
            otherwise 
                val = false;
        end        
end

% [EOF]

% LocalWords:  archit fracdelayport
